G
Guest
I have a form that uses a BeforeUpdate event procedure and VBA to edit data
and insist that minimum data standards be used when updating/createing a
record. When I use the record navigation buttons it ignors the edit routine
and does not process records with invalid data from the past. When I use a
combo box to select a new record it calls the edit routine. The code for the
combo box is:
Private Sub LookupContactLast_AfterUpdate()
Form_BeforeUpdate (1)
If StopCond = True Then
StopCond = False
GoTo Exit_LookupContactLast_AfterUpdate
End If
Me.RecordsetClone.FindFirst " [ID] = " & Me![LookupContactLast]
Me.Bookmark = Me.RecordsetClone.Bookmark
ContactLast.SetFocus
Exit_LookupContactLast_AfterUpdate:
Exit Sub
End Sub
StopCond is a Public binary variable that is set to true in the sub
procedure Form_BeforeUpdate if any data editing condition fails.
LookupContactLast is the combo box used to select another record for display.
Why do the record selector buttons ignor procedure Form_BeforeUpdate() if
the data in a record would otherwise fail edits (many garbage records from
the past) yet does invoke the Form_BeforeUpdate() edit procedure when using
the combo box to navigate to another record?
Earl Phillips
Ex Mainframer Learning Access
Local Community Food Bank Volunteer
and insist that minimum data standards be used when updating/createing a
record. When I use the record navigation buttons it ignors the edit routine
and does not process records with invalid data from the past. When I use a
combo box to select a new record it calls the edit routine. The code for the
combo box is:
Private Sub LookupContactLast_AfterUpdate()
Form_BeforeUpdate (1)
If StopCond = True Then
StopCond = False
GoTo Exit_LookupContactLast_AfterUpdate
End If
Me.RecordsetClone.FindFirst " [ID] = " & Me![LookupContactLast]
Me.Bookmark = Me.RecordsetClone.Bookmark
ContactLast.SetFocus
Exit_LookupContactLast_AfterUpdate:
Exit Sub
End Sub
StopCond is a Public binary variable that is set to true in the sub
procedure Form_BeforeUpdate if any data editing condition fails.
LookupContactLast is the combo box used to select another record for display.
Why do the record selector buttons ignor procedure Form_BeforeUpdate() if
the data in a record would otherwise fail edits (many garbage records from
the past) yet does invoke the Form_BeforeUpdate() edit procedure when using
the combo box to navigate to another record?
Earl Phillips
Ex Mainframer Learning Access
Local Community Food Bank Volunteer