Simple Solution I Think... Option Group

fenhow

Registered User.
Local time
Yesterday, 20:39
Joined
Jul 21, 2004
Messages
599
Hi, I have an option group with two options
0 & 1

What I am trying to do is trigger an event if 0 is selected:
Update the status of a different option group and run some code
And if 1 is selected just update the status of the different option group but not run some code.
What I have is below, the problem I have is the code msgbox and send_Email triggers no matter which option I select.
Any help would be greatly appreciated.
Fen

Private Sub Frame46_AfterUpdate()
If Me.Frame46 = 2 Then Me.POAdminStatus = 1
MsgBox "PO Fulfilled! - Notification Sent, please make sure all documents are uploaded and Paid With Section is complete.", vbOKOnly, "CAM360"
send_email_PO
If Me.Frame46 = 1 Then Me.POAdminStatus = 0
Refresh
End Sub
 
You've used the one-line format of an If/Then block. Sounds like you want:

Code:
If Me.Frame46 = 2 Then 
  Me.POAdminStatus = 1
  MsgBox "PO Fulfilled! - Notification Sent, please make sure all documents are uploaded and Paid With Section is complete.", vbOKOnly, "CAM360"
  send_email_PO
ElseIf Me.Frame46 = 1 Then 
  Me.POAdminStatus = 0
End If
 
Paul, you are awesome! Worked perfectly- Thank you so much. You are truly valuable to this forum.
Fen
 

Users who are viewing this thread

Back
Top Bottom