Full Version: record count is null
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
I am trying to manually secure my database. I have 6 groups that each require access to different forms & objects in the database.
created a Password table that contains Username, Password, Group.
Ocreated a Password form that requests the Username & Password
I pass the Username & Password to a parameter query.
If the query returns no results, the Username & Password are not valid
If the query returns results, I would like to open the database based on my defined group levels.
The problem: After I run the query, I don't know what to do with the results. What I want to say is:
If query result is Null, display the message that it is not a valid username/password.
If query result Is Not Null (the password is valid) -- open the database with Form A, Form B, Report D enabled.
But, since a Query cannot have a value property, like Null, I'm at a loss. I believe I can do something with a record count, but the only examples I have been able to find refer to opening database connections and "Dim"ing recordsets, and I'm not quite sure how to do that in my VB code.
I'd appreciate any help that can be provided. Thank you.
Welcome to UA!
There are lots of great code examples in the code archive.
Check out this Security Demo
Hope this helps...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.