Date/Timestamp Button

  • Thread starter Thread starter poochbeast
  • Start date Start date
P

poochbeast

I just started using Access 2003 as a contact manager. I want to
create a button next to a text box that when clicked will insert the
current day, date, and time into that box in the following format:
Sun., 03/15/2005 - 12:53 PM.

Can anybody help me with this? I am new to Access and I will need a
detailed step-by-step tutorial. If that is not possible, can you point
me to an online tuturial when I can find this information?
Thank you.
Paul
 
poochbeast said:
I just started using Access 2003 as a contact manager. I want to
create a button next to a text box that when clicked will insert the
current day, date, and time into that box in the following format:
Sun., 03/15/2005 - 12:53 PM.

Can anybody help me with this? I am new to Access and I will need a
detailed step-by-step tutorial. If that is not possible, can you point
me to an online tuturial when I can find this information?
Thank you.
Paul

In design view of the form select the button and on the properties sheet
{Events} tab find OnClick and in the drop-down list select [Event Procedure].
Then press the build [...] button to the right of the property box.

Once in the VBA code window enter...

Me.TextBoxName = Now()

Formatting is all done with the format property of the TextBox so just set that
as desired. There is no such thing as "storing a date in a particular format".
All that formatting does is control what you see.
 
Back
Top