I have a database where I store notes in a separate table where it stamps the username and date and time of the note automatically. I know how to use SQL to select the latest date, but I want to know how to make the field automatically requery when a report is run. It is easy to do on the form, set the vb code to requery the field at specific events. My guess right now is to set the query to run when a new record is created in the notes table. I would just like to know if there is an easier way to be sure it is capturing the latest.
My SQL code looks like this:
SELECT Date FROM (PO INNER JOIN NOTES ON PO.MRID=NOTES.MRID) WHERE Date=(SELECT MAX(Date) FROM NOTES)
Any help is appreciated.
My SQL code looks like this:
SELECT Date FROM (PO INNER JOIN NOTES ON PO.MRID=NOTES.MRID) WHERE Date=(SELECT MAX(Date) FROM NOTES)
Any help is appreciated.