I would have thought this would be rather easy, but Access has other ideas...
Basically,
(2) forms.
Switchboard1
Switchboard2
Switchboard1 has (3) buttons
TN
MS
CA
Switchboard2 has an unbound text box named Facility
When the user clicks (on Switchboard1), TN
the unbound text box reads "TN", if MS is clicked, "MS" appears in the unbound text box and so on.
The problem:
Switchboard2 has several options and there is a need to disable certain command buttons based upon which location is choosen.
Therefore, I have tried the following in the On Load, On Open, On Current and On Activate (One at a time).
If Me.Facilitiy = "CA" or Me.Facility = "TN" then
[Gulf].Enabled = False
else
end if
However, nothing seems to be working and the button is never disabled. In an attempt to see where the problem is, I changed the code to a msgbox to the below:
If Me.Facility = "CA" Then
MsgBox "OK"
Else
MsgBox "Not OK"
Then I went to form1 and clicked CA, however the "Not Ok" box appeared...
Any ideas???
Thank you for any and all help,
PBrown
Basically,
(2) forms.
Switchboard1
Switchboard2
Switchboard1 has (3) buttons
TN
MS
CA
Switchboard2 has an unbound text box named Facility
When the user clicks (on Switchboard1), TN
the unbound text box reads "TN", if MS is clicked, "MS" appears in the unbound text box and so on.
The problem:
Switchboard2 has several options and there is a need to disable certain command buttons based upon which location is choosen.
Therefore, I have tried the following in the On Load, On Open, On Current and On Activate (One at a time).
If Me.Facilitiy = "CA" or Me.Facility = "TN" then
[Gulf].Enabled = False
else
end if
However, nothing seems to be working and the button is never disabled. In an attempt to see where the problem is, I changed the code to a msgbox to the below:
If Me.Facility = "CA" Then
MsgBox "OK"
Else
MsgBox "Not OK"
Then I went to form1 and clicked CA, however the "Not Ok" box appeared...
Any ideas???
Thank you for any and all help,
PBrown