Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup Error - #Error

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I have the following code in the control source however I am getting the #Error.

Code:
=DLookUp("[MileageRate]","tblVehicles","[RegistrationNumber] = " & [Forms]![frmCalculator]![txtRegNumber])

RegistrationNumber in tblVehicles is a text field.

The field on the form is a simple textbox
 
Try either this:
Code:
=DLookUp("[MileageRate]","tblVehicles","[RegistrationNumber]='" & [Forms]![frmCalculator]![txtRegNumber] & "'")
or this:
Code:
=DLookUp("[MileageRate]","tblVehicles","[RegistrationNumber]=[Forms]![frmCalculator]![txtRegNumber]")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top