Updated Date and Updated by User

muralikreddy

Kris Reddy
Local time
Today, 05:43
Joined
May 23, 2005
Messages
9
Hi,

I have to upload an excel file on a daily basis into a access table. I have created a macro for the same in access. But I want to add two fields to the the table everytime the data is uploaded to the table which are "Updated date" and "User". Please help me how can I update the two fields in the table.
 
Hi,

I have to upload an excel file on a daily basis into a access table. I have created a macro for the same in access. But I want to add two fields to the the table everytime the data is uploaded to the table which are "Updated date" and "User". Please help me how can I update the two fields in the table.




Just run an update query for the 2 fields. Run it in the same macro.

Hope this helps.
 
Thanks a lot for the response.

Its working but there is a small problem. Whenever i run the update query, the date for the entire table is getting changed. As I'm uploading the excel data into the table on a daily basis, actually the 'Uploaded Date' should be changed only for the current upload and not records previously uploaded.

Thanks & Regards,
 
Hello,

Use the 'Criteria:' row of the update query to filter only the records you would like to update. One possiblity would be to add '>Date()' fo the date field.

Hope this helps

Art ;)
 
If you are adding new data to an existing table, you need to be using an Append Query rather than an Update Query, which would be used to modify existing data.

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom