Refer to a field in a Table **

  • Thread starter Thread starter Guest
  • Start date Start date
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??
 
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
 
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
 
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)?
 
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.
 
Back
Top