Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating a text box automatically

Status
Not open for further replies.

RnRExpress

Technical User
Oct 24, 2004
53
US
I have a command button that I click on a record, which prints out a report with this record's information. What I would also like to do, is after I select that command button and the report prints, I also wish to have a text box on this record to automatically fill in with today's date. This way I know when the report had run for this paricular record.

This is the code I currently have which runs the report perfect.

Private Sub Command209_Click()
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Record ID] = " & Me.[Record ID]
DoCmd.OpenReport "Second Notice", acViewNormal, , strWhere
End If
End Sub

Is there something I can add to this to have my text field "2nd notification" populate with the date?

Thanks in advance!
Richard

 
me.[2nd Notification] = date()
or
me.[2nd Notification] = now()

now() had date AND time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top