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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time Macro with "After Update" Problem

Status
Not open for further replies.

RobertIngles

Technical User
Jan 20, 2011
113
CA
I am inserting the date and time a record was updated using a simple macro which triggers via the "After Update" event procedure - it works fine in two other forms. In a new form I just created I am referring to the same macro, I have added the DateModified and TimeModified columns to the table, updated the associated query and ensured that the SQL statement includes the new fields. I have created the form several times and each time I try to close the updated form am getting an error:
"You can't save the record at this time, Microsoft Access may have encountered an error while trying to save a record....etc"

Does anyone know why this would happen and what I can do to fix it?
 
Sorry, what I meant is that I added the new time and date fields in my table to the query in order to add them to the form. I know that that would be obvious since the fields made it into the form - just really frustrated with this form and wanted to explain in my question that I covered all the steps needed for the darn thing to work. I also backtracked to ensure everthing was spelled correctly - again, probably obvious, if they were spelled incorrectly I would have gotten an error message that there was no reference to the mispelled field. Any advice would be greatly appreciated, I have created the form from scratch about six times now and still getting the same error message.
 
I'd use the BeforeUpdate event of the form instead of the AfterUpdate ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Working perfectly now. Thank you so much PHV - I looked back at the forms where the update worked and I had used the BeforeUpdate. Your experience and help are greatly appreciated!!
Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top