Re: Is Dirty OR Is Not Dirty?
- From: "True.Kilted.Scot@xxxxxxxxx" <True.Kilted.Scot@xxxxxxxxx>
- Date: 24 Apr 2006 04:26:47 -0700
Baz,
Here is the code in my Combo Box's AfterUpdate:
Private Sub txtEmployeeID_AfterUpdate()
'Setup for errortrapping
On Error GoTo Err_txtEmployeeID_AfterUpdate
'Requery the form to display the most recent data
Me.Requery
'Setup the link field between the main form and the subform
Me.txtTSEmployeeID = Me.txtEmployeeID.Column(1)
'Requery the subform
Me.sfmFullTime***.Form.Requery
'If the record has not been submitted,move the focus to the
dateworked field
If Me.chkSubmitted <> -1 Then
txtDateWorked.SetFocus
End If
Exit_txtEmployeeID_AfterUpdate:
'Exit the AfterUpdate procedure
Exit Sub
Err_txtEmployeeID_AfterUpdate:
'An error has occured, so record it
Call LogError(Err.Number, Err.Description,
"frmUATTime***.txtEmployeeID_AfterUpdate", , False)
Resume Exit_Err_txtEmployeeID_AfterUpdate
End Sub
"If the breakpoint you mention is in the BeforeUpdate event, then you
will
not see it when the record is dirtied. The BeforeUpdate event fires
when
you attempt to save a record (e.g. by moving to a new record), not when
the
record is dirtied. "
I follow what you are saying above, however, in relation to my own
database, I don't understand it!!!
When I display my first record, everything is fine. I then move to the
next record in the sequence, and the breakpoint "If Me.Dirty = TRUE" is
TRUE, adn so the code in the BeforeUpdate is triggered. However, each
subsequent move to th enext or previous record, see's the "If Me.Dirty
= TRUE" condition, evaluating to FALSE.
Duncs
.
- Follow-Ups:
- Re: Is Dirty OR Is Not Dirty?
- From: Baz
- Re: Is Dirty OR Is Not Dirty?
- References:
- Is Dirty OR Is Not Dirty?
- From: True . Kilted . Scot
- Re: Is Dirty OR Is Not Dirty?
- From: Baz
- Re: Is Dirty OR Is Not Dirty?
- From: True . Kilted . Scot
- Re: Is Dirty OR Is Not Dirty?
- From: Baz
- Is Dirty OR Is Not Dirty?
- Prev by Date: Re: Dirty forms in Access 2003
- Next by Date: Re: Is Dirty OR Is Not Dirty?
- Previous by thread: Re: Is Dirty OR Is Not Dirty?
- Next by thread: Re: Is Dirty OR Is Not Dirty?
- Index(es):