T
Turrisi
I have a continous form that is used to lookup and change information. I am
trying to write the users ID and the current date. The functions ork on a
single form. Below is how I use the functions.
Private Sub Form_Load()
auditorwrt.Value = Auditortxt.Value
datewrt.Value = Datetxt.Value
End Sub
when this didnt work I tried the following function for the date:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'auto date on update'
If Me.NewRecord Then
Me!datewrt.Value = Date
End If
'save changes dialog box'
Dim strMsg As String
strMsg = strMsg & "Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub
trying to write the users ID and the current date. The functions ork on a
single form. Below is how I use the functions.
Private Sub Form_Load()
auditorwrt.Value = Auditortxt.Value
datewrt.Value = Datetxt.Value
End Sub
when this didnt work I tried the following function for the date:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'auto date on update'
If Me.NewRecord Then
Me!datewrt.Value = Date
End If
'save changes dialog box'
Dim strMsg As String
strMsg = strMsg & "Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub