By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Onclick get date???

P: n/a
I have a text box that I need to enter the date into on mouse click.
Could anyone give me the code please?
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
CRH
Hmmm...
try:

Private Sub Text0_Click()
Text0 = Format(Now(), "short date")

End Sub

"javatiger" <ti*******@yahoo.com> wrote in message
news:96**************************@posting.google.c om...
I have a text box that I need to enter the date into on mouse click.
Could anyone give me the code please?

Nov 12 '05 #2

P: n/a
"javatiger" <ti*******@yahoo.com> wrote in message
news:96**************************@posting.google.c om...
I have a text box that I need to enter the date into on mouse click.
Could anyone give me the code please?


Me!TextBoxName = Date()
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #3

P: n/a
If this is data entry, rather than editing data, you might want to consider
using a DefaultValue of =Date(), and allowing the user to overtype it if
that is not what they want. Of course, if you want both date and time, use
the builtin Now() function instead of Date().

Larry Linson
Microsoft Access MVP

"javatiger" <ti*******@yahoo.com> wrote in message
news:96**************************@posting.google.c om...
I have a text box that I need to enter the date into on mouse click.
Could anyone give me the code please?

Nov 12 '05 #4

P: n/a
"CRH" <cr*****@hotmail.com> wrote in message news:<C2**********************@newssvr28.news.prod igy.com>...
Hmmm...
try:

Private Sub Text0_Click()
Text0 = Format(Now(), "short date")

End Sub

"javatiger" <ti*******@yahoo.com> wrote in message
news:96**************************@posting.google.c om...
I have a text box that I need to enter the date into on mouse click.
Could anyone give me the code please?


Thanks for that, works like a treat :-)
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.