Add current Date in running make table query?

K

KarenY

I have been searching for the help of adding a date to a table which is made
from Make Table Query. I have got the idea of adding a current date on a
form, table automatically; but I can't find the answer to solve my problem.

I have a table of data from download through our Main Office, I have to run
"make table query" to create a new table for exporting to the Excel file for
other users perusal. The reason of running "Make Table Query" is to remove
some unnecessary data from the download file as well as keeping all the
downloads in a history table. The download has to be done daily, e.g.
download on Monday will have Friday's data. There was a "shipped date" in
the download file. I need to add an extra field for the date I action on
(i.e. current date) on the file to each record (e.g. about 20 to 40 records
per download).
I was trying to add an extra field in the Make Table Query with :
ActionDT:[Date:()]
hoping it would assign a current date automatically. Yet the parameter box
pops up and I have to enter the date manually.

Is there a way to add an extra field for the current date from Make Table
Query that I don't need to do that manually after the table is made. And
that the additional field is not "binary" but Date/Time field in the table?
What I meant manually above is: I have to add an extra field in the Design
of the table created from the "make table query" and then enter in the
"default": Date()

Any help and idea is appreciated. I am using Access 2003 and I am sorry I
dont have much knowledge about VBA.

thanks
Karen
 
J

John Spencer

Try removing the [] around the Date function

Field: ActionDt: Date()

By the way if you are creating the table just to export the data then stop.
You can just export the query instead.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
K

KarenY

Super! John. I always like your answers! It works !
Through your help, my interest have been grown to enjoy creating Data Base
(sort of programming) to help my colleagues. You have helped me out for this
DB a couple of weeks ago.

I understand that I can export the Query. Exporting the Query direct to
Excel is perfectly good, because it runs automatically once the download of
the "daily" file is complete from ODBC. Yet I have to append to the daily
ones to the existing table for RECORDS IN HISTORY. The append qry does not
pick up the current date as an extra field.

Thanks
Karen

John Spencer said:
Try removing the [] around the Date function

Field: ActionDt: Date()

By the way if you are creating the table just to export the data then stop.
You can just export the query instead.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

KarenY said:
I have been searching for the help of adding a date to a table which is
made
from Make Table Query. I have got the idea of adding a current date on a
form, table automatically; but I can't find the answer to solve my
problem.

I have a table of data from download through our Main Office, I have to
run
"make table query" to create a new table for exporting to the Excel file
for
other users perusal. The reason of running "Make Table Query" is to
remove
some unnecessary data from the download file as well as keeping all the
downloads in a history table. The download has to be done daily, e.g.
download on Monday will have Friday's data. There was a "shipped date" in
the download file. I need to add an extra field for the date I action on
(i.e. current date) on the file to each record (e.g. about 20 to 40
records
per download).
I was trying to add an extra field in the Make Table Query with :
ActionDT:[Date:()]
hoping it would assign a current date automatically. Yet the parameter
box
pops up and I have to enter the date manually.

Is there a way to add an extra field for the current date from Make Table
Query that I don't need to do that manually after the table is made. And
that the additional field is not "binary" but Date/Time field in the
table?
What I meant manually above is: I have to add an extra field in the Design
of the table created from the "make table query" and then enter in the
"default": Date()

Any help and idea is appreciated. I am using Access 2003 and I am sorry I
dont have much knowledge about VBA.

thanks
Karen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top