On a form opening, there is code to run a query. Unfortunately it takes a while to run. How can I put in a reference to only run the code if the form was last opened longer than 5 hours ago?
On form open code
Me.R1 = "Loading Files, Please Wait"
Me.R1.Visible = True
DoEvents
GetNames
DoCmd.Beep
Me.R1 = "< Please Select a Report
On form open code
Me.R1 = "Loading Files, Please Wait"
Me.R1.Visible = True
DoEvents
GetNames
DoCmd.Beep
Me.R1 = "< Please Select a Report