I have a table named Perms that contains 3 fields: TheUser, TheForm and ThePermission. I have written the following query
SELECT Perms.TheUser, Perms.TheForm, Perms.ThePermission
WHERE (((Perms.TheUser)=Environ("username")) AND ((Perms.TheForm)=[screen].[activeform].[name]));
One record in the table is: robert.smith / testform / Yes
When I test it by using the wizard to create a form based on this query and name it testform, it shows the record, but if I close that form and re-open it, it does not. I can tell it's not picking up the screen.activeform.name the second time. What could be causing this?
The goal I'm after is to have a function that will run whenever a form is opened, check the username and formname against the Perms table and conditionally do stuff based on what's in ThePermission.
Can anyone out there in smart guy land help me?