Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If no buttons selected

Status
Not open for further replies.

cayden2007

Technical User
Mar 19, 2007
22
US
All,
I am trying to figure out how to not have an action happen if something else is selected.

I have a radio button on a form called schedEngActivity.

If this is selected, I don't want the following code to initiate:

Code:
If Me!installed_ops.Value = False And Me!installed_mss.Value = False And Me!installed_ops_mss.Value = False Then no_buttons_selected_installed = True
End If

Here is the entire code:

Code:
Private Sub Command195_Click()

Dim ansYesNo As Integer
Dim MsgStr As String

On Error GoTo Err_CmdClose_Click

Dim strSubject As String
Dim no_buttons_selected As Boolean

strSubject = Me.title

no_buttons_selected = False

If Me!installed_ops.Value = False And Me!installed_mss.Value = False And Me!installed_ops_mss.Value = False Then no_buttons_selected_installed = True
End If

If no_buttons_selected Then
    MsgBox "Please select Permanent Baseline Change, Temporary Baseline Change, or Scheduled Engineering Activity"
    Cancel = True
    perm_baseline_change.SetFocus
    Exit Sub
End if

If installed_ops, installed_mss, or installed_ops_mss are all False, but schedEngActivity is True, then I don't want the user to have to choose either of the radio buttons: installed_ops, installed_mss, or installed_ops_mss

I hope that explains it good enough:)

Thank you for any help!!!
 
What about this ?
If Me!installed_ops = False And Me!installed_mss = False And Me!installed_ops_mss = False [!]And Me!schedEngActivity = False[/!] Then
no_buttons_selected_installed = True
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top