Insert date automatically

ashley1

Registered User.
Local time
Today, 02:12
Joined
Apr 7, 2005
Messages
35
Hiya

i want to add todays date automatically after selecting some fileds
so say i have records of students, by a sql query i can select all the records when students have withdrawn but then i need to add todays date to the "date field" for each record, does any one know how i can go about doing this?

thanks
 
you may put =Date() as the default value for your date field.
 
thanks for reply

i dont understand because i have so many records i want to insert the date automatically in the date field

so say i have a table "withdrawn" with filed "name" "address" and "date"
when i find all students with a query that have withdrawn how will i get each date field to fill with todays date automatically, instead of me typing it in

thanks
 
oh i got your point now, you can do that with an update query.

Moreover, do not name your fields in the table "name" and "date", because those are reserved words for Access, which may lead you to trouble at a later stage.
 
cool thanks very much for advice
it worked fine
 
hiya
theres another problem when new records are addded i dont wont the dates to change, so if i find that more students have withdrawn 2mo i want to keep the dates as they were yesterday and only add dates to new records
how can i do that?
 
when you are doing the update query, instead of putting =Date(), put the actual date such as "11/04/2005" in the "Update to" row.
 
i get it
what i did was added extra criteria to find null fileds and only add todays date to them
thank you very much for your time and help
hopefully thats the end of it :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom