B
Bob Waggoner
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.
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.