ikzouhetnietweten
Registered User.
- Local time
- Today, 13:40
- Joined
- Oct 23, 2015
- Messages
- 44
I want my textbox FirstName to work.
So I have a Dlookup that has to search for two criteria.
I need to lookup the FirstName field in the table Klanten.
It just stays empty in my form after I click a Customer and contactperson in the comboboxes.
txtnaam contains the customername that it has to lookup aswell in the table Klanten.
So I have a Dlookup that has to search for two criteria.
I need to lookup the FirstName field in the table Klanten.
It just stays empty in my form after I click a Customer and contactperson in the comboboxes.
txtnaam contains the customername that it has to lookup aswell in the table Klanten.
Code:
Private Sub Contactpersoon_AfterUpdate()
Me.FirstName = DLookup("FirstName", "Klanten", "[LastName]= '" & Me.Contactpersoon & " AND [Klantnaam]= " & Me.txtnaam & "'")
End Sub
Last edited: