I have never used DLookup is VBA before and I am receiving a Runtime 2471 error. (The object does not contain the automation object 'AAB.")
If IsNull(DLookup("[Office_Range]", "Tbl_Affiliate_Offices", "[Office_Range] = " & Mid(Textline, 4, 3))) Then
Office_Range is the field in the Tbl_Affilaite_Offices table.
The Mid(Textline ,4,3) is the data I would like to compare against the "Office_Range" field.
The runtime error value AAB is the value in Mid(Textline ,4,3).
If IsNull(DLookup("[Office_Range]", "Tbl_Affiliate_Offices", "[Office_Range] = " & Mid(Textline, 4, 3))) Then
Office_Range is the field in the Tbl_Affilaite_Offices table.
The Mid(Textline ,4,3) is the data I would like to compare against the "Office_Range" field.
The runtime error value AAB is the value in Mid(Textline ,4,3).