Error 13: Type mismatch (1 Viewer)

PatAccess

Registered User.
Local time
Today, 08:32
Joined
May 24, 2017
Messages
284
Hello Guys,

Here my code:
Private Sub Command131_Click()
DoCmd.OpenForm "Frm_CorpUpdateLogin", , , "[ID]=" & Me.ID & "" And "CorpLicID=" & Me.CorpLicID & "" And "StateLic=" & Me.StateLic & ""
End Sub

I get error code type mismatch
the ID is an autonumber all the rest are numbers. I've tried every which way but I still get the same error

What am I missing?

Thanks in advance!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:32
Joined
Aug 30, 2003
Messages
36,118
The doubled-up quotes will cause a problem.

Edit: plus you don't want the quotes between And and the next field name.
 

PatAccess

Registered User.
Local time
Today, 08:32
Joined
May 24, 2017
Messages
284
Thank you...It worked
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:32
Joined
Aug 30, 2003
Messages
36,118
Happy to help!
 

Users who are viewing this thread

Top Bottom