F
fabio
hi everyone,
I just started playing with Access and I have a problem.
I created a log in form for entering User.ID and Password and I would
like a button to verify the log in and eventually opening tha main form
of the application.
I wrote a simple query to verify is the values entered in the ID and
Password fields on th Log- In form are present in the corrtect User table.
What I would like to do is open the query if there is a result, then the
user and password is correct and the main form is opened, otherwise the
user is not allowd to enter. I don't know how to check if the result of
the query is empty or not, I dont know what ius the object returned by
the command OpenQuery.
Here what I wrote in VBA
DoCmd.OpenQuery "Query_Log_In"
if IsNull " the recordset returned by the query"
then MsgBox "please enter the right user Id and password"
else DoCmd.OpemForm " Main"
Sorry for being so long in explanation.
Could you please suggest what I have to write on the if condition?
thanks in advance
Fabio
I just started playing with Access and I have a problem.
I created a log in form for entering User.ID and Password and I would
like a button to verify the log in and eventually opening tha main form
of the application.
I wrote a simple query to verify is the values entered in the ID and
Password fields on th Log- In form are present in the corrtect User table.
What I would like to do is open the query if there is a result, then the
user and password is correct and the main form is opened, otherwise the
user is not allowd to enter. I don't know how to check if the result of
the query is empty or not, I dont know what ius the object returned by
the command OpenQuery.
Here what I wrote in VBA
DoCmd.OpenQuery "Query_Log_In"
if IsNull " the recordset returned by the query"
then MsgBox "please enter the right user Id and password"
else DoCmd.OpemForm " Main"
Sorry for being so long in explanation.
Could you please suggest what I have to write on the if condition?
thanks in advance
Fabio