David Trickett
Registered User.
- Local time
- Today, 02:21
- Joined
- Nov 20, 2002
- Messages
- 16
I have been writing Excel vba code for ages, but have recently inherited an Access database and am trying to get it under control!
Simplifying the issue the database contains a table called "People". This has 2 fields, Name and Status. Status can be "Master" or "Slave".
My code has already identified the name - call it CurrentUser.
I need to restrict access to a form opened by a button on another form to users with the status "Master"
So the logic would be:
Find CurrentUser in table("People")
If currentrecord.status <> "Master" then exit sub
(Excel programmers will see from the second line that I use the "Open" statement a lot!).
Thanks
David Trickett
Simplifying the issue the database contains a table called "People". This has 2 fields, Name and Status. Status can be "Master" or "Slave".
My code has already identified the name - call it CurrentUser.
I need to restrict access to a form opened by a button on another form to users with the status "Master"
So the logic would be:
Find CurrentUser in table("People")
If currentrecord.status <> "Master" then exit sub
(Excel programmers will see from the second line that I use the "Open" statement a lot!).
Thanks
David Trickett