T
Tom
Hi,
I'm trying to have a DLookup function where on the form after the user input
ContactName field the Company will populate automatically.
The table is Contactstbl with the fields FullName and company.
This is what I tried to do:
Private Sub ContactName_AfterUpdate()
Dim Comp As Variant
Comp = DLookup("[Company]", "Contactstbl", "[FullName] =" _
& Forms![MeetNCall]!ContactName)
Me.Company = Comp
End Sub
It does not work, any ideas?
TIA,
Tom
I'm trying to have a DLookup function where on the form after the user input
ContactName field the Company will populate automatically.
The table is Contactstbl with the fields FullName and company.
This is what I tried to do:
Private Sub ContactName_AfterUpdate()
Dim Comp As Variant
Comp = DLookup("[Company]", "Contactstbl", "[FullName] =" _
& Forms![MeetNCall]!ContactName)
Me.Company = Comp
End Sub
It does not work, any ideas?
TIA,
Tom