Hi, All,
Can anyone please tell me what the correct syntax is for using Filter to find a particular record with two variables to filter on?
For example, I am using this :-
addfile.Filter = "Password = '" & str1 & "'" And "UserName = '" & str & "'"
to find if a particular password and a particular username occur as a record in an opened recordset. The recordset seems to open OK,it has fields called Password and UserName and if I use either one of the variable statements on their own eg :-
addfile.Filter = "Password = '" & str1 & "'"
this works OK. When I put them both together it fails!!
Thanks in advance
Can anyone please tell me what the correct syntax is for using Filter to find a particular record with two variables to filter on?
For example, I am using this :-
addfile.Filter = "Password = '" & str1 & "'" And "UserName = '" & str & "'"
to find if a particular password and a particular username occur as a record in an opened recordset. The recordset seems to open OK,it has fields called Password and UserName and if I use either one of the variable statements on their own eg :-
addfile.Filter = "Password = '" & str1 & "'"
this works OK. When I put them both together it fails!!
Thanks in advance