auto insert current date

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

Hello group. I have a sub form that I am updating using a query with a
start and end date. My two fields are date and totals. The new record
works fine, although there isn't anything in the date field. I would like
to have it auto insert the date of the end.txt field on the form. How can I
pull this off? many thanks in advance!

Troy
 
In form design view, set the Default Value of the ending date field to:
=Date()
 
thanks Allen, but that isn't working. I may have confused
you when I said I wanted to insert the end.txt on the
form. I want the new record on my table to auto insert
the date from a field on another form.

Thanks!
 
In that case you will need to use a line of code like this:
Forms![NameOfYourOtherFormHere]![NameOfTargetTextboxHere] = Date
 
This date has to be entered into a table Allen. How can I
use this code for that?

-----Original Message-----
In that case you will need to use a line of code like this:
Forms![NameOfYourOtherFormHere]!
[NameOfTargetTextboxHere] = Date
 
If the text box on the form is bound to a field in the table, then the date
you assign will end up in the table field.

If the bit about the form was inaccurate, execute an UPDATE query statement
to update the correct field of the correct record of the correct table
directly.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Troy said:
This date has to be entered into a table Allen. How can I
use this code for that?

-----Original Message-----
In that case you will need to use a line of code like this:
Forms![NameOfYourOtherFormHere]!
[NameOfTargetTextboxHere] = Date
 
Back
Top