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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation Error

Status
Not open for further replies.

cutestuff

Technical User
Sep 7, 2006
162
CA
hi,

Quick question:
I have the following piece of code for my login form:
If Me.txtPassword.Value = DLookup("strUserPassword", "tblUsers", "[UserID]=" & Me.cboUserName.Value) Then
lngMyUserID = Me.cboUserName.Value

This code works great for the login form (with the username as a combo box). However, I changed the combo box for the username into a textbox.

After I changed it though, I got this error:
"Object doesn't contain automation object" & username

Anyone know why and how do I fix this? Please?

Thank you very much.


 
Lol. Never mind. I've figured it out.
It was my syntax in my Dlookup parameters. When I changed it to text, I didn't change the criteria to read as string.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top