Can VB code be declared on fly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

While starting my mdb a welcomeForm appears where the user enters the Name
and then it goes to Switchboard form.

As per the requirement I want to only one person to have access to Edit
data. Therefore on the every form opening It will be checked that which user
has started the mdb and based on that it will AllowEdit.

Therefore is there any method that on fly (global declaration till the mdb
is opened) the user name will be saved. this name it will collect from the
welcomeForm Text1, so that it crosscheck on every form opening.

Please advise

Regards.

Irshad
 
Why code this? It sounds like you just need to implement Access security.
That was you can give each user a logon, and use the Access security wizard
to decide which user can open which form.

HTH
Vayse
 
Leave welcomeForm open, but hide it. Then you can reference that form from
every other form.

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "UserSeesOnlyHisRecords2k.mdb" which does something like that.
The sample reads you network login to restrict which data you can see.
Instead of this, you would have the user login, hide the fLogin form, and
then reference that form from all your other forms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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

Back
Top