Sorry first time here. It was suggested that I should put this question in the correct forum and I concur. I have already had a couple of replies and I will paste in.
I can't seem to make this work. Please take a look at this and see where I am going wrong.
The bottom line answer I need is the field called "DUNNS"
I have a combo box and in that combo box, I have two fields
Contractor Name and Dunns.
On a form I have the unlink field with the following, but I get a error message "Name?"
REPLY: DUNCAN
genomon, thanks ever so much for the reply
I have it as a unbound txt box now.
I guess I could explain little more in detail.
Here is an example of what I trying to achieve
combo box
Field 1= Contractor Name
Field 2= Dunns Number
When I select the Contractor Name from the Combo Box, I need the Dunns number popup in the unbound text field.
I will try your suggestion as well, but I think I have already tried that as well without the ID parameter.
Once again thanks for the reply and any other suggestions.
1.DUNNS = field containing the data I need
2.Table/combo box = Tblcontractor Name
3.ID = primary key
4. This where I don't know how to call it from a combo Box
DLookUp("[dunns]","Tblcontractor Name","[ID] = ' " & Me![Contractor Name] & " ' ")
I also tried the below it work but of course I only can relate to one record
=DLookUp("[DUNNS]","Tblcontractor Name","[id]=3135")
Any help would be appreciated
Thanks
REPLY FROM genomon (Programmer)
You are only returning one record - use a text box. If you want to return multiple records, use an SQL statement as the RowSource of the combo box, without the ID parameter.
I can't seem to make this work. Please take a look at this and see where I am going wrong.
The bottom line answer I need is the field called "DUNNS"
I have a combo box and in that combo box, I have two fields
Contractor Name and Dunns.
On a form I have the unlink field with the following, but I get a error message "Name?"
REPLY: DUNCAN
genomon, thanks ever so much for the reply
I have it as a unbound txt box now.
I guess I could explain little more in detail.
Here is an example of what I trying to achieve
combo box
Field 1= Contractor Name
Field 2= Dunns Number
When I select the Contractor Name from the Combo Box, I need the Dunns number popup in the unbound text field.
I will try your suggestion as well, but I think I have already tried that as well without the ID parameter.
Once again thanks for the reply and any other suggestions.
1.DUNNS = field containing the data I need
2.Table/combo box = Tblcontractor Name
3.ID = primary key
4. This where I don't know how to call it from a combo Box
DLookUp("[dunns]","Tblcontractor Name","[ID] = ' " & Me![Contractor Name] & " ' ")
I also tried the below it work but of course I only can relate to one record
=DLookUp("[DUNNS]","Tblcontractor Name","[id]=3135")
Any help would be appreciated
Thanks
REPLY FROM genomon (Programmer)
You are only returning one record - use a text box. If you want to return multiple records, use an SQL statement as the RowSource of the combo box, without the ID parameter.