gold007eye
Registered User.
- Local time
- Yesterday, 19:05
- Joined
- May 11, 2005
- Messages
- 260
I seem to be stumped and am hoping this is something easy to do. In the code below what I am trying to do is if the users clicks the "Yes" button; then the 'Case vbYes' (See red code) statement will continue processing the event procedure from the 'Else:' (see blue code) statement below it.
My problem is I don't know how to get the code to look to the Else: statement. I have tried "GoTo Else:" & "GoSub Else:" with no luck.
Is there a simple way to do this or something under the vbYes that can be entered like "Continue the code where it left off"?
I just don't want to have to have the same code in twice on the Event Procedure.
My problem is I don't know how to get the code to look to the Else: statement. I have tried "GoTo Else:" & "GoSub Else:" with no luck.
Is there a simple way to do this or something under the vbYes that can be entered like "Continue the code where it left off"?
I just don't want to have to have the same code in twice on the Event Procedure.
Code:
Private Sub Search_Results_DblClick(Cancel As Integer)
If IsNull([Search Results]) Then
'Do Nothing
ElseIf [Search Results].Column(2) = "N" Then
Select Case MsgBox("The City [" & [Search Results].Column(0) & "] you have selected is NOT an Acceptable USPS City Name." _
& vbCrLf & vbCrLf & "Please Note: If you continue to use this City Name the letter could possibly be returned as Non-Deliverable!" _
& vbCrLf & vbCrLf & "Are you sure you want to use this City Name?", vbYesNo + vbCritical, "Not an Acceptable USPS City Name...")
[COLOR="Red"]Case vbYes: 'Use this City Name anyways.
'Go to the "ELSE:" Statement and continue processing code.[/COLOR]
Case vbNo: 'Don't use this City Name; select a different one.
MsgBox "Please Select a different City Name.", vbInformation, "Select a Different City Name..."
Exit Sub
End Select
[COLOR="Blue"]Else:[/COLOR]
If CurrentProject.AllForms("Provider Letters").IsLoaded Then
Forms![Provider Letters]![City] = [Search Results].Column(0)
Forms![Provider Letters]![State] = [Search Results].Column(1)
Else:
'Do Nothing for now...
End If
DoCmd.Close acForm, "Zip Code Search - Select Record"
End If
End Sub