How do you have a drop down grey out depending who is on the form.
Posted on 2011-03-23
I have a database that has a switchboard with 16 forms on it. There is a log in process before the voters can get into the forms.
Now that the records have been entered, into the forms. I need a way for them to vote on the records that have been typed in the forms.
I have 4 drop downs for the voters on each form. They can either vote: Authenticated, limited use, no test , pending.
The problem is I need a way that when they get on the forms to vote they can only vote in their section. So I would need the rest of the voters voting options to be grayed out except for the voter that is voting.
I’m thinking that I would need an if statement which would start at the log in process. Once they log in the drop down for the voters would turn gray except for the voter who logged in. So depending on who they longed in as depends what is grayed in on the voting selection of the form.
What code will I need to use , and where does the code go in my log in process. How does the voting drop down only available to that one voter and the rest is grayed out? Here is the log in code.
I have an if statement that determines log in process.
Private Sub Command5_GotFocus()
If Text1 = "aec" And Text3 = "aec" Then
MsgBox "Welcome,Access Granted!", vbInformation, "Login_Form"
MsgBox "Welcome to FBCB2 JCR LUT Database", vbInformation, "FBCB2"
ElseIf Text1 = "otc" And Text3 = "otc" Then
MsgBox "Welcome,Admin!", vbInformation, "FBCB2"
MsgBox "Welcome to FBCB2 JCR LUT Form Statistics", vbInformation, "FBCB2"
DoCmd.OpenForm "frm_FBCB2 JCR LUT _Status"