Skip a line of code and continue
- From: Bob Waggoner <BobWaggoner@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Jun 2009 07:07:07 -0700
I have a "Check Work" button a user can click to see if they've completed a
record.
Can anyone show me a bit of code that simply pops up a list of skipped
items? For example: VendorCode, TypeofComment, Comment, ContactPerson are
some of the fields the program checks.
Right now, I have this code evaluating the fields to see if they are complete:
DoCmd.Echo True, ""
If (IsNull(.EmployeeName)) Then
Beep
MsgBox "Advisory - Please enter the Employee Name.",
vbInformation, "You Forgot the Employee Name"
DoCmd.GoToControl "WebEmployeeName"
Exit Sub
End If
Instead of having code that notifies the user of each skipped box and then
stops, I'd either like to list the skipped fields or allow the user to allow
the code to continue checking.
My attempt to allow the user to continue the check goes like this:
DoCmd.Echo True, ""
If (IsNull(.[EmployeeName])) Then
Dim intanswerEmployeeName As Integer
intanswerEmployeeName = MsgBox("Continue?", _
vbQuestion + vbYesNo, "Continue?")
If intanswerEmployeeName = vbYes Then
[This is the missing code....]
End If
If intanswerEmployeeName = vbNo Then
MsgBox "Advisory - Please enter Employee Name.", vbQuestion,
"You forgot to enter the Employee Name"
DoCmd.GoToControl "EmployeeName"
Exit Sub
End If
End If
If you can help, I'd appreciate it. Thanks.
.
- Follow-Ups:
- Re: Skip a line of code and continue
- From: tina
- RE: Skip a line of code and continue
- From: Beetle
- Re: Skip a line of code and continue
- Prev by Date: Re: Contact Mgmt fields
- Next by Date: RE: Historical Data & re-sorting new data
- Previous by thread: Historical Data & re-sorting new data
- Next by thread: RE: Skip a line of code and continue
- Index(es):