I have a module that authenticates users and controls who has full or read-only access to certain forms. My problem is this; things such as combo boxes and checkboxes that are meant to be used for any user are disabled in read-only mode.
I was thinking that I could use the tag property on my controls to establish which controls should always be enabled and then using my module to dynamically enable/disable the appropriate controls each time I load a form. Can anyone help me do this?
Basically all I really need to know is how to address the form in a module (since I can't use "Me.Controlname" and I don't know which form is being worked on until runtime. And also I don't want to lock records, since this won't allow other users to view the tables being used.
Also I don't want to use the Enable property because I don't want the data to be "greyed out". I could use the Locked property, but that poses the problem of multiple users trying to access the same table. So is there a way I can set certain fields to read-only without making the whole form read-only or locking the data?
By the way, I am working in Access 97
Here's a pseudo-code example of what I want
for each Cntrl in PassedForm.Controls
if Cntrl.Tag <> "AlwaysEnable" then
Disable Cntrl
end if
next
I was thinking that I could use the tag property on my controls to establish which controls should always be enabled and then using my module to dynamically enable/disable the appropriate controls each time I load a form. Can anyone help me do this?
Basically all I really need to know is how to address the form in a module (since I can't use "Me.Controlname" and I don't know which form is being worked on until runtime. And also I don't want to lock records, since this won't allow other users to view the tables being used.
Also I don't want to use the Enable property because I don't want the data to be "greyed out". I could use the Locked property, but that poses the problem of multiple users trying to access the same table. So is there a way I can set certain fields to read-only without making the whole form read-only or locking the data?
By the way, I am working in Access 97
Here's a pseudo-code example of what I want
for each Cntrl in PassedForm.Controls
if Cntrl.Tag <> "AlwaysEnable" then
Disable Cntrl
end if
next
Last edited: