Microsoft
Software
Hardware
Network
Question : Before Update Event in Combo Box Cancel event
This is my code and attached are examples of errors I get.
Statement "Cancel = True" is causing the problem.
Error1 happens only in this example, but Error2 happens in all my combo boxes on various forms throughout the project where I have Cancel = True in the Before Update Event.
Private Sub Client_ID_BeforeUpdate(Can
cel As Integer)
If Nz(DLookup("[Client ID]", "[tblAttendance]", "[Session ID] = " & _
Nz(Forms![frmSessionAttend
ance].Form
.Recordset
.[Session ID], 0) & _
"AND [Client ID] = " & Nz(Me.[Client ID], 0)), 0) <> 0 Then
MsgBox "This client already exists on this list."
Me.Client_ID.Undo
Cancel = True
End If
End Sub
Answer : Before Update Event in Combo Box Cancel event
If you cancel the before update event of a control then you also need to cancel the form before update event and handle the form undo event. See
www.thenelson.name/#Report
FormTricks
, "Check for required items" for details on how to do it.
Random Solutions
ISA 2006 - 12202 The ISA Server Denied the specified Uniform Resource Locator (URL)
WPF repeat animation.
what to key do you press to restore an EMACHINE 3646
I need to capture the output of the datagrid grdAttendees and record each Members Email Address.
Delete duplicate records
Error No Windows Terminal Server Name is set up in Business Portal purchasing
Trouble with a Winforms .NET Framework 2.0 list box
Windows/Microsoft Updates all fail for new install of Win XP Pro
Outlook Distribution Lists
FileSystemWatcher VB.Net How to check if File is opened by application