Check user credentials

I

IgorM

Hi

I have a database in access mdb file. In Excel I created a userform where
user inputs a username and password. What's the best way to check if the
given credentials are correct - in VBA of course?

Kind regards
IgorM
 
B

Bob Phillips

Igor,

Surely, you would just have a user table with passwords on the database, and
check against that?
 
I

IgorM

Bob Phillips said:
Igor,

Surely, you would just have a user table with passwords on the
database, and
check against that?
I have creared users in the database. So i don't really want to query
any tables but I want to check if a ceartain user with a provided
password exists, ie is created in the mdb file.
 
T

Tim Williams

Just try to run a simple select on the database using the credentials
supplied, and check any errors (if generated).

Tim
 
I

IgorM

I know that this is one of the possibilities. But I was thinking about
something more advanced.So I just want to know is such and such user has
access to database, but I don't want to query any tables in the database to
do this.
 
F

fisch4bill

You're going to have to query SOMETHING to find out if the user has access.
It makes more sense to query the database than to duplicate your data
somewhere else, and query that. That's the whole rationale behind relational
databases - reduced data duplication and less maintenance - You'll have to
update TWO databases rather than just one if you don't query the original
database.
 

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