Using the TODAY function in a form?

dfkdfk

Registered User.
Local time
Today, 18:42
Joined
Jun 2, 2008
Messages
12
Hi, I've got a simple form where we enter in inventory items as we recieve them. Typing the date in is kind of a pain in the arse. I know in Access 2007 it has a little button that you can press and it inserts today's date. Is there any way I can do that or something similar with Access 2003?

Searching for "TODAY" function in the forms forum isn't turning anything up.

Thank you,

Dan
 
Me.ReceivedDate = Date()


Thanks, where do I put that piece of code in my database? Sorry, I'm not too sharp w/ the VBA just yet. I did try to put it in the Code Portion of my form. Under:

Code:
Option Compare Database
Me.ReceivedDate = Date()
 
Thanks, where do I put that piece of code in my database? Sorry, I'm not too sharp w/ the VBA just yet. I did try to put it in the Code Portion of my form. Under:

Code:
Option Compare Database
Me.ReceivedDate = Date()


Bueller? ;)
 
If you always want this entered when a new record is created, in Design View for your form

Right Click on the textbox

Click on Properties

Click on Data

In the Default Value box type in = Date()
 
If you always want this entered when a new record is created, in Design View for your form

Right Click on the textbox

Click on Properties

Click on Data

In the Default Value box type in = Date()

Awesome. Thank you so much... now, what if I didn't always want it to be today's date? I imagine it gets much more complicated, right?

edit - Actually, what I got going now is great. thanks.
 
Last edited:
The Default Value means that is what is automatically the value of the field when a new record is created. This can be changed to something else, if need be. A little more explanation of what you're trying to do might help us help you.
 
The Default Value means that is what is automatically the value of the field when a new record is created. This can be changed to something else, if need be. A little more explanation of what you're trying to do might help us help you.


missinglinq - I think the = date() thing is going to be more then adequate. All I am doing is making an add inventory form, and one of the entries was adding the date, and since most of the stuff we are adding into the database is new arrivals, I found it to be a pain to continually add today's date in. I can see that I can also modify the date if I need to on the form, so even if we add stuff that doesn't have today's date... it's not a big deal.

So the solution you offered solved the problem very well.

Thanks again for your help.
 

Users who are viewing this thread

Back
Top Bottom