Problem wherecondition using And

nnoor

New member
Local time
Today, 06:36
Joined
Jan 19, 2014
Messages
5
Hello
See Code below;

Private Sub Winner_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmTeamsSelect", acNormal, , ("[MatchNo]=" & Me.[MatchNo] And "[mtID]=1"), acFormEdit, acDialog
End Sub

I am facing problem in where condition. when I pass single condition one by one it works ok but when i pass both conditions at same time (using And) code generates runtime error#13 (type mismatch)
Can someone figure out my mistake?

Best Regards
 
Thanks Friends it solved
it was
DoCmd.OpenForm "frmTeamsSelect", acNormal, , "[MatchNo]=" & Me.[MatchNo] & " And [mtID]=1", acFormEdit, acDialog

Best Regards
 

Users who are viewing this thread

Back
Top Bottom