adding a date field to an imported table

S

stephanie duhau

I have an excel spreadsheet that I update every day 3
times per day. I have linked it to my Access Database. I
would like to be able to save the information from this
table into another table adding a date field and a number
field. Is there a macro I can create? and how?
Please Help !
stephanie
 
J

John Vinson

stephanie duhau said:
I have an excel spreadsheet that I update every day 3
times per day. I have linked it to my Access Database. I
would like to be able to save the information from this
table into another table adding a date field and a number
field. Is there a macro I can create? and how?
Please Help !
stephanie

An Append query based on the linked spreadsheet would be able to do this.
You could run the query from a macro or from VBA code, or manually. You don't
say how the value in either field would be determined, but you could have the
date field default to Date() for today's date, or to Now() for the current
date and time; and you could use either an Autonumber or one of the many
kinds of "custom counter" to get an incrementing number field.

John W. Vinson [MVP]
 
S

stephanie duhau

-----Original Message-----
thanks for your answer.
I would like to have a pop up window that would allow the
user to enter the current date and the number (1 to 3)and
then append it to a summary table. Is that possible?
 
J

John Vinson

I would like to have a pop up window that would allow the
user to enter the current date and the number (1 to 3)and
then append it to a summary table. Is that possible?

Sure. If the popup form is named frmLoad with two textboxes -
txtToday, default value Date() to save the user having to type it, and
txtNum, you'ld create an Append Query based on the linked spreadsheet;
and in two vacant Field cells type

Datefield: [Forms]![frmLoad]![txtToday]

and

Numfield: [Forms]![frmLoad]![txtNum]

Put a command button on the form (using the command button wizard) to
run the query and that should do the job.

John W. Vinson[MVP]
 
Top