dlookup in a form not working

valeriej42

Registered User.
Local time
Yesterday, 16:04
Joined
Mar 29, 2013
Messages
34
I have a form that uses a dlookup to populate a text box from a combo box. It worked but recently it has stopped. I am working on the entire database so I created a copy to work on. Not only has the dlookup stopped working in my copy but in the original as well. I didn't change anything that should have affected that I don't think. There are two other dlookups on the form that are connected to a combobox as well and they still work. The format of the one that doesn't work and the ones that do is the same. The one that doesn't work is:
=DLookUp("[Train_Description]","TrainAdm","[Training_Number]=Forms![TrainForm]![CB_TrainNo]")
Originally [Training_Number] was [Train_Number] but the combobox control is called Training_Number so I tried changing it. There is no error it just doesn't do anything. Can someone PLEASE help?!?!?!?:banghead:
 
I have a form that uses a dlookup to populate a text box from a combo box. It worked but recently it has stopped. I am working on the entire database so I created a copy to work on. Not only has the dlookup stopped working in my copy but in the original as well. I didn't change anything that should have affected that I don't think. There are two other dlookups on the form that are connected to a combobox as well and they still work. The format of the one that doesn't work and the ones that do is the same. The one that doesn't work is:
=DLookUp("[Train_Description]","TrainAdm","[Training_Number]=Forms![TrainForm]![CB_TrainNo]")
Originally [Training_Number] was [Train_Number] but the combobox control is called Training_Number so I tried changing it. There is no error it just doesn't do anything. Can someone PLEASE help?!?!?!?:banghead:


Try:
=DLookUp("[Train_Description]","[TrainAdm]","[Training_Number]= '" & [Forms]![TrainForm]![CB_TrainNo] & " ' ")
 

Users who are viewing this thread

Back
Top Bottom