I have successfully used the LogOnExample.mdb file in a database I'm using and I've been able to understand the code behind it a little bit, but I could really use some explanation on it's inner workings.
Specifically, the evaluation code sets the administration button to be dimmed for those who don't have access to it. I'm trying to replicate this feature so that I have other buttons that respond the same way.
So here is where I'm at. Given that I'm using LogOnExample as my base for administrating the user accounts and permissions, I've copied the VBA for Form_frmUsers to the new page's code Form_frmTraining (I'm creating a training page that only a moderator will have access to). After enough fooling around, I discovered that you can dictate who can OPEN that form simply by placing what Case arguments you want to have access in formLoad sub. Where I'm having difficulty is constructing the .cmdOpenTraining.Enabled argument on the Form_frmMenu. If you look in the User.UserLevel case, you'll see that the LogOnExample already stipulates several arguments for the User form that is moderated by the original code. I just want to do the same thing for the Training form and I keep running into compile errors.
Any help?
Specifically, the evaluation code sets the administration button to be dimmed for those who don't have access to it. I'm trying to replicate this feature so that I have other buttons that respond the same way.
So here is where I'm at. Given that I'm using LogOnExample as my base for administrating the user accounts and permissions, I've copied the VBA for Form_frmUsers to the new page's code Form_frmTraining (I'm creating a training page that only a moderator will have access to). After enough fooling around, I discovered that you can dictate who can OPEN that form simply by placing what Case arguments you want to have access in formLoad sub. Where I'm having difficulty is constructing the .cmdOpenTraining.Enabled argument on the Form_frmMenu. If you look in the User.UserLevel case, you'll see that the LogOnExample already stipulates several arguments for the User form that is moderated by the original code. I just want to do the same thing for the Training form and I keep running into compile errors.
Any help?