DLookup Runtime 2471 error

Jagerdawg

New Member
Joined
Jun 20, 2002
Messages
9
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).
:oops:
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
What is Textline? A control on a form? If so, try:
Code:
Me.Textline
or
Code:
Forms!Your_Form.Form!Textline
not really sure though as I don't use Domain Functions either.
 
Upvote 0

Forum statistics

Threads
1,221,657
Messages
6,161,084
Members
451,684
Latest member
smllchng5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top