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

adding the date to a form

Status
Not open for further replies.

shenlon

Programmer
Jul 9, 2003
47
0
0
US
I have a data entry form setup from the form wizard, but my question is this: when I add a new entry, I have to click add from the toolbar at the bottom of the page. When this new blank form pops up, I would like to have the current date already entered in a certain field (the set-up date field). How would I do this?
 
Correct.

Also, if you have text field that you want to enter a date into, by default it will be text. Therefore, I usually set the inital value to {} and then it is treated as a date.



Jim Osieczonek
Delta Business Group, LLC
 
jimoo

Also, if you have text field that you want to enter a date into, by default it will be text. Therefore, I usually set the inital value to {} and then it is treated as a date.

Or 'D' in the format of the textbox.

Or this.Value = CTOD('') in the init of the textbox.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
shenlon,

given your requirement I would set the value property of the texbox for set-up date to Date()...or alternatively you could set the "default value" of the field (that the textbox is bound to) in the table to Date()...this last solution is only applicable if you are using tables that are part of a dbc (not free tables)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 


have it in your add's click event, that is if the user clicks ADD, you should "initialize" your date's textbox to DATE()

HTH
 
Another thing to remember is that if this is an automatic value that shouldn't change, you should set the textbox.Enabled property to .F. so the user can't change the date on you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top