I'm trying to fill in a field from another field in a form in Microsoft Access, and it won't let me.
I'm using the following code:
Me.CompanyTelephoneNumber = DLookUp("CompanyTelephoneNumber", "Company Book", "Company = " & Me.Company.Value"
I get an error with the criteria which doesn't appear to be right. The helpful tooltip tells me the correct me.company.value as does the immediate window. Shouldn't it be "CompanyID = " & Me.Company.Value" ?
I'm using the following code:
Me.CompanyTelephoneNumber = DLookUp("CompanyTelephoneNumber", "Company Book", "Company = " & Me.Company.Value"
I get an error with the criteria which doesn't appear to be right. The helpful tooltip tells me the correct me.company.value as does the immediate window. Shouldn't it be "CompanyID = " & Me.Company.Value" ?