Dlookup Problem

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
Not getting a result

On a form I want to look for a value in a separate table based on a value in a Text box on this form

My table Name is: tblRFPStageLst
I want the Value from: Catagory1
Looking for a Match to the Field: RFP_Stage

The Textbox on the Form is: RFP_StageX

Here is the last thing I tried: =DLookUp("Catagory1","tblRFPStageLst","RFP_Stage=RFP_StageX")

Thanks
 
double check the name of the control too - it has to be spelled exactly right.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Looks like these work (assume your form is named myForm):
=DLookUp("Catagory1","tblRFPStageLst","RFP_Stage='" & [RFP_StageX] & "'")
=DLookUp("Catagory1","tblRFPStageLst","RFP_Stage='" & [Forms]![myForm]![RFP_StageX] & "'")

Guess it doesn't like the Me part if you are not actually in a code module.
 
Upvote 0
Guess it doesn't like the Me part if you are not actually in a code module.
Ah, yes. Good catch xenou.
 
Upvote 0
Its bound. Its a Listbox the user selects when completing information on the form.
 
Upvote 0
I think if your remove the "[Me]." part like xenou mentioned, that should work. You would use that naming convention in a VBA Module, but not in a Control Source.
Sorry I led you down the wrong path with that part.
 
Upvote 0

Forum statistics

Threads
1,225,611
Messages
6,185,996
Members
453,334
Latest member
Prakash Jha

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