I have form, where there is a combo that is first in line, to be set, on a new record. When that combo is changed (Change event), I want to check if we are on a new record. If we are, I want to save this record, and refresh some unbound textboxes, which are set on the form's Current code. To have that happen, it would need to see that the current record is no longer a new record, as the current code checks for that.
This is what I have in the Change code, for the combo:
It seems that me.dirty = false doesn't change the current record from being seen as a new record. I check the back-end table and it inserts the record, assigning the PK (SQL identity).
Anyone know how to accomplish what I'm trying to do?
Thanks!
This is what I have in the Change code, for the combo:
Code:
Private Sub FKMyType_Change()
If Me.NewRecord Then
If Me.Dirty Then
Me.Dirty = False
End If
End If
Me.MyName.Requery
Me.MyNo.Requery
End Sub
It seems that me.dirty = false doesn't change the current record from being seen as a new record. I check the back-end table and it inserts the record, assigning the PK (SQL identity).
Anyone know how to accomplish what I'm trying to do?
Thanks!