DCount function to verify username and password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am tryting to follow another posting suggestion on 12-5-05 using the DCount
function to verify username and password fields are present in a table. The
command is:

DCount(1,"Tables![Gina Password List]","[UserName] ='" & [Forms]![Gina
Password List]![UserName] & "' AND [Password] ='" & [Forms]![Gina Password
List]![Password] & "'")>0

I have this in the condition statement of the second line of my macro.
However, it does not fire that line. The macro line is a data output
function. Does anyone know what I am not doing wrong?
 
try

DCount(1,"Gina Password List","[UserName] = '" & [Forms]![Gina
Password List]![UserName] & "' AND [Password] = '" & [Forms]![Gina Password
List]![Password] & "'")>0

if you're running the macro from the form "Gina Password List", then try

DCount(1,"Gina Password List","[UserName] = '" & [UserName] & "' AND
[Password] = '" & [Password] & "'")>0

hth
 
Back
Top