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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to Input Current Date in Table Field

Status
Not open for further replies.

srossbach

IS-IT--Management
Sep 12, 2000
50
US
I have an Access 97 Database where I have created a form that has several macro buttons to print client letters as cases are rejected or accepted by our organization. What I would like to do is have the macro also update the field (i.e., Date Client Letter Sent) with the current date.

Can this be accomplished throught the regular macro builder?


Any and all assistance is appreciated.

Have a GREAT DAY!
 
Does your macro currently run a query to get the clients that you should send letters to?

If so you could create an second update query that uses the same criteria as your original that the report is based on. Then, run both in the macros in the code.

You could encounter some problems doing it in a macro though...you might change one query and the other query might not get changed - then you'd have things out of sync.

Why not look at doing it in the code of the report?

J. Jones
jjones@cybrtyme.com
 
No...the macro prints the current selection (record you are currently on).
 
What would the code look like to update the DATE LETTER SENT field to the current date?
 
Try:

Forms!myForm![DATE LETTER SENT].Value = Now()

J. Jones
jjones@cybrtyme.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top