dlookup with combx

Joe8915

Registered User.
Local time
Today, 04:02
Joined
Sep 9, 2002
Messages
820
I am trying to show the Dunns number in the ubound text field.

Tbl Name= Tblcontractor Name
Field Name = Dunns
ID name= is ID
ComboBx Name = Contractor Name

=DLookUp("[dunns]",Tblcontractor Name","[ID] = " & [Contractor Name] & " ' ")

now when I try to use a combobx. I get a error msg

Can you point and tell me where its wrong. I think I have tried everything to make is work.

thanks
 
There are a couple of typos there . . .

Try:
txtbox = DLookUp("[dunns]","Tblcontractor Name","[ID] = ' " & Me![Contractor Name] & " ' ")

or
 
thank you for the quick reply.

I tried that as well and it came asking for a name?

Sounds like its not reconizing the combo box maybe, what do you think?

I tried this as well with a new combo bx

=DLookUp("[dunns]","Tblcontractor Name","[ID] = ' " & me.Combo291 & " ' ")


This is the only thing that I able to get to work with dlookup:

=DLookUp("[DUNNS]","Tblcontractor Name","[id]=3135")
 
Last edited:
The following work like a charm

Private Sub YourComboBox_AfterUpdate()
Me.YourUnboundTextbox = Me.YourComboBox.Column(1)
End Sub
 

Users who are viewing this thread

Back
Top Bottom