DLookup error

  • Thread starter Thread starter quixote
  • Start date Start date
Q

quixote

I am getting the following error:

Run-time error '64479':
The expression you entered as a query parameter produced
this error: 'The object doesn't contain the Automation
object 'TEST."

For the following function:

If Me.txtPassword = DLookup
("[Password]", "tblUsers", "[UserID]=" & Me.cboUserID) Then

strCommercialID = Me.cboCommercialID

All fields are text. I think I am missing single quotes
somewhere but can't quite figure out where and how.

Thanks
 
If the combo box contains text, then use this (delimit its value with '
character):

If Me.txtPassword = DLookup
("[Password]", "tblUsers", "[UserID]='" & Me.cboUserID & "'") Then
 
Back
Top