Refer to a field in a Table **

G

Guest

Hello, if someone could help me ASAP, I'd really appreciate it. I have a
database that opens up a form asking for the user's ID and password. How
would I code it to get that ID and Password and compare it to a table I have
of userid's and passwords and match it up and allow the user to enter the
database if they are on that table or NOT??
 
T

Tim Ferguson

How
would I code it to get that ID and Password and compare it to a table
I have of userid's and passwords and match it up and allow the user to
enter the database if they are on that table or NOT??

Hmmm... don't forget to prevent the user pressing <shift> as she opens the
database; and you'll have to prevent against someone opening the db using
OLE automation; and then there's reading the data using Excel, or another
mdb, or MS Query, etc etc.

You might want to look at proper Access User Level Security if you want to
do this properly.

Best wishes


Tim F
 
B

Bas Cost Budde

Is that supposed to be secure? :)

Let your controls be named ctlUsername and ctlPassword, your table be
called USysUsers (the USys prefix makes it hidden along with the other
system objects) with fields username and password respectively, both
datatype Text.

Your form will open modally, I presume? From any OK button you may
provide, execute something similar to this (watch for line wrap):

if dlookup("password","USysUsers","username='"& ctlusername
&"'")<>ctlpassword then Quit
 
G

Guest

I agree with Tim. Using the built in security functions is a much better way
to go.
 
G

Guest

Do you know if theres any way of setting up security permissions which only
affect the one database and also follow the database over a network (using
office2000)?
 
D

Douglas J. Steele

That's what Access ULS is all about.

You just need to remember to ship the associated MDW file along with the
MDB, or no one will be able to get in.
 

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