H
HeliCaptKirk
I have several update queries that I would like to automate the Date field to
today's date and the "UpdatedBy" field to the person who's logged in
"GUserName."
When a person logs in, his name is written to a global variable "GUserName"
so that the system can update records automatically with that user's name.
This works perfectly on all the forms.
I have written a number of update queries where I'd like to update the
tables with new values and at the same time update the "UpdatedBy" field and
the "ModfiedDate" field with the values from "GUserName" and today's date
respectively.
Every time I try something, I only get a pop-up parameter input box instead
of the system automatically inserting the value and moving on. Any ideas?
What I've ended up with (not what I want) is to enter the following in the
"Update To" field of the query:
for the date: [(Today's Date as DD/YY/YY)]
for the User: [(Your Name: Last, First)]
These work, but it leads to inaccurate data possible (formatting, spelling,
etc..) as well as having to enter it by hand each time. The system already
knows the User's name (GUserName) and today's date. There must be a way to
automatically include these variables in the query. Thanks in advance.
today's date and the "UpdatedBy" field to the person who's logged in
"GUserName."
When a person logs in, his name is written to a global variable "GUserName"
so that the system can update records automatically with that user's name.
This works perfectly on all the forms.
I have written a number of update queries where I'd like to update the
tables with new values and at the same time update the "UpdatedBy" field and
the "ModfiedDate" field with the values from "GUserName" and today's date
respectively.
Every time I try something, I only get a pop-up parameter input box instead
of the system automatically inserting the value and moving on. Any ideas?
What I've ended up with (not what I want) is to enter the following in the
"Update To" field of the query:
for the date: [(Today's Date as DD/YY/YY)]
for the User: [(Your Name: Last, First)]
These work, but it leads to inaccurate data possible (formatting, spelling,
etc..) as well as having to enter it by hand each time. The system already
knows the User's name (GUserName) and today's date. There must be a way to
automatically include these variables in the query. Thanks in advance.