Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control property question 1

Status
Not open for further replies.
Dec 15, 2003
3
US
Hello. I am tracking data changed in a database by using a macro in the after update of fields that sets values in other fields on the form.

date - working fine
username - working fine
Last field updated - I can only get this to work if I refer to the specific control.

example: [Forms]![frmMaritalStatusCodes]![MaritalStatusDescription].[Name]

Unfortunately I do not want to create a separate macro for all of the text boxes on my forms. Does anyone know how to refer to the name of the specific text box that was just changed without having to write a million macros?

Thanks.
 
Can you set the LastfieldUpdated's value in the after update event of your controls.

Example:
me.LastFieldUpdated=me.MaritalStatusDescription.name

HTH,
Eric
 
Thanks luceze,

I put that in code in the after update. It works great. All I have to do now is just change the field names in the code for the rest of the text boxes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top