W
Walter
Sorry! I hit the wrong key.
I have a form with 5 controls bound to a table. One control is the
PK(autonumber). Two controls are required in the table design. The other
two are not required but at least one needs to have data for the record to be
complete. I put the following code in the On Close event of the form to
check for this.
Private Sub Form_Close()
If IsNull(Me.ctlDOT_) _
Or IsNull(Me.ctlSerialNumber) Then
Me.Undo
End If
End Sub
In testing, the two controls show the values contained in the first record
in the table even though the controls on the form are blank. I've also
noticed that the PK control is populated when the form opens not after
entering data into one of the other controls.
I have a form with 5 controls bound to a table. One control is the
PK(autonumber). Two controls are required in the table design. The other
two are not required but at least one needs to have data for the record to be
complete. I put the following code in the On Close event of the form to
check for this.
Private Sub Form_Close()
If IsNull(Me.ctlDOT_) _
Or IsNull(Me.ctlSerialNumber) Then
Me.Undo
End If
End Sub
In testing, the two controls show the values contained in the first record
in the table even though the controls on the form are blank. I've also
noticed that the PK control is populated when the form opens not after
entering data into one of the other controls.