T
Ted
i have added a control btn to my form in A2K and when clicked it actuates the
following vba:
Private Sub AddRecord_Click()
On Error GoTo Err_AddRecord_Click
Forms("Screening Log").AllowAdditions = True
If Not Me.NewRecord Then DoCmd.GoToRecord , , acNewRec
Me.StudyNumber.Value = "REQUIRED"
Me.RegNumber.Value = "REQUIRED"
Me.[On-Study Date].Value = #1/1/1900#
DoCmd.GoToControl "StudyNumber"
Forms("Screening Log").Dirty = False
Forms("Screening Log").AllowAdditions = False
Exit_AddRecord_Click:
Exit Sub
Err_AddRecord_Click:
MsgBox Err.description
Resume Exit_AddRecord_Click
End Sub
what i'd like to do is assure myself that the user has not left the record
b4 inputing valid data.
i've been doing some reading and thought that perhaps the "NewRecord"
property might/could help. is this getting warm?
-ted
following vba:
Private Sub AddRecord_Click()
On Error GoTo Err_AddRecord_Click
Forms("Screening Log").AllowAdditions = True
If Not Me.NewRecord Then DoCmd.GoToRecord , , acNewRec
Me.StudyNumber.Value = "REQUIRED"
Me.RegNumber.Value = "REQUIRED"
Me.[On-Study Date].Value = #1/1/1900#
DoCmd.GoToControl "StudyNumber"
Forms("Screening Log").Dirty = False
Forms("Screening Log").AllowAdditions = False
Exit_AddRecord_Click:
Exit Sub
Err_AddRecord_Click:
MsgBox Err.description
Resume Exit_AddRecord_Click
End Sub
what i'd like to do is assure myself that the user has not left the record
b4 inputing valid data.
i've been doing some reading and thought that perhaps the "NewRecord"
property might/could help. is this getting warm?
-ted