Ok, I have the following code:
Private Sub purgebtnsrch_Click()
Dim MedID As String
' Get Value from Medicaid_ID textbox on the Form:
Me.purgebtnsrch.SetFocus
Me.SrchPurgeMed_ID.SetFocus
MedID = Me.SrchPurgeMed_ID.Text
Dim Msg, Style, Title, Response, MyString
Msg = (Chr(10)) & " Was this Billing Number located in interChange? "
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "Critical"
If IsNull(DLookup("Last_Name", "Provider", "Provider.Medicaid_ID = '" & SrchPurgeMed_ID & "'")) Then
' NAME is Null because the Medicaid_ID doesn't exist.
'DoCmd.OpenForm "AddNewFile", , , "Provider.Medicaid_ID = '" & SrchMed_ID & "'"
Else
' NAME is not Null because the Medicaid_ID does exist.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then 'User chose Yes.
MyString = "Yes"
DoCmd.OpenForm "Copy Of UpdateCurrentFile", , , "Provider.Medicaid_ID = '" & SrchPurgeMed_ID & "'"
Else 'User chose No.
MyString = "No" 'Perform some action.
'Msg = "Give file to Amanda" & vbNewLine & vbNewLine & "for further review."
End If
End If
End Sub
I am wanting 2 reponses, MyString = "Yes" response is working. It opens the form requested.
My issue is I can not get an additional message box to pop-up when "No" is selected. I know
that this is propbably a simple fix but for some reason I can not figure this out. I would like
the Msg in red above to be a message box with an "Ok" button.
Thanks,
Lisa