Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 open form IF

Author  Topic 

osupratt
Posting Yak Master

238 Posts

Posted - 2009-03-23 : 13:44:43
On my switchboard I have a selection 'enter field ticket data'. this will open a form for data entry purposes. what i would like to have happen is that when someone selects this from the switchboard a form pops up asking "what location?".

If the user isn't in a table entered in for this location (table consisting of username and location fields) then a message box would pop up stating "you are not authorized to enter for this location".

How could this be done? Thanks in advance for any help.

wakkowarner
Starting Member

4 Posts

Posted - 2009-04-01 : 13:30:52
Put a button on the "what location" form that will execute code. In the code try to open a recordset with the criteria for the username and location combination. Check to see if the recordset contains any records. If it does not, then the entry doesn't exist and the user doesn't have access. Otherwise, the entry exists, the user has access, call the form for the user to enter data.

This is high level right now. How exactly you code this depends on how you use store usernames (Windows usernames, Access usernames?).
Go to Top of Page
   

- Advertisement -