How can I have an If/Then statement perform 2 commands instead of just one per conditional IF statement?
Once a condition is true I want the then command to do 2 things not just one. The AND command doesnt work.
If RecordCount = 0 And Forms!devicemai n![Category] = "Server" Then
Forms!connect![PortA] = Me![PortID] THEN
Forms!connect!S eeInterfaceZ.Fo rm.Visible = False
ElseIf RecordCount = 0 And Forms!devicemai n![Category] = "Switch" Or Forms!devicemai n![Category] = "raritan" Then
Forms!connect![PortZ] = Forms!portmain![PortID]
End If
Exit_connectto_ Click:
Exit Sub
Err_connectto_C lick:
MsgBox Err.Description
Resume Exit_connectto_ Click
End Sub
Once a condition is true I want the then command to do 2 things not just one. The AND command doesnt work.
If RecordCount = 0 And Forms!devicemai n![Category] = "Server" Then
Forms!connect![PortA] = Me![PortID] THEN
Forms!connect!S eeInterfaceZ.Fo rm.Visible = False
ElseIf RecordCount = 0 And Forms!devicemai n![Category] = "Switch" Or Forms!devicemai n![Category] = "raritan" Then
Forms!connect![PortZ] = Forms!portmain![PortID]
End If
Exit_connectto_ Click:
Exit Sub
Err_connectto_C lick:
MsgBox Err.Description
Resume Exit_connectto_ Click
End Sub
Comment