DCount function to verify username and password

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?
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top