Update query with query name

trab

Registered User.
Local time
Today, 01:33
Joined
Feb 10, 2014
Messages
20
I have table which I add records to on a monthly basis. I then populate fields using a succession of update queries. I would like to update a field, which tells me which update query was used to update that record. Is that possible without simply using free-text?

KR

Trav
 
i think no possible, you have to hard-code the query name.
 
cant you add the name into the query?

qry.png
 
Most of my tables include ChangeDT and ChangeBy columns. They are normally populated in the BeforeUpdate event of the form used to update that particular table. When I run bulk update queries, I do what Ranman256 suggested and populate both the date/time and I use the query name as the ChangeBy.
 
Thankyou all. Not the answer I was hoping for, though - I wondered whether access would have some trick up its sleeve, maybe somewhere in the Build option. I have over 40 update queries, and I didn't relish having to edit them all. In the end, I went along with the VBA route using a variable for the query name.
 
hello trab:


i am wrong, it can be done using query:


Update yourTable Set [nameOfQueryField]=[CurrentObjeName]
 

Users who are viewing this thread

Back
Top Bottom