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

Access date stamp

Status
Not open for further replies.

brumy

Programmer
Aug 3, 2003
6
0
0
US
I would like to include an option in an Access form that would allow the current date to be entered in a field box by just checking a box beside it -- doable?

Darren
 
in the click event of the box you want to just check put something like txtBoxIwantTheDate2ShowUpIn = Now
 
I tried the "=now", but that did not seem to work -- the text box I am wanting to have updated is linked to a field in the master table with a date format -- should I xcahnge the format?

I typed exactly this in the "on click" event -- "=now(dd,mm,yy)"

Am I missing something?

Darren
 
this works for me

Private Sub Command2_Click()
Text0 = Now() ' gives date and time

Text0 = Date ' gives just the date
End Sub

what sort of error are you getting?

 
I use a double click on the date type textboxes. If the TB is null, it puts today's date in it. If not it either advances the date by one or decreases the date by one day - whichever makes sense in your app.

private sub text0_dblClick()

if IsNull( me.text0) then
me.text0 = int(now())
else
me.text0 = me.text0 +1
endif

end sub


Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top