Hi, I hope someone can help me. I have a form with a timer on it. The form automatically runs quite a large amount of reports at specified times. I have a textbox on the form which tells you which report is going to run next and at what time.
However, the textbox does not automatically update so whatever report is due to run next when you first open the form stays in the box until you close the form, instead of updating each time a new report is run (I hope this makes sense!). I have tried "text9.requery" and also "Form_Auto_runs.Refresh" but this still doesn't seem to make it update. Any suggestions?
I imagine you have a table which lists all the reports that are supposed to run. On this table do you have a time when the report is supposed to run? If so, make your text box bound to a query and only let it show reports that are after the current time. Then requery the form after each report run as the last line of code.
The text box is already bound to a query which works out when the next report will run and which report it is. After the report is run, I have put "text9.requery" (text9 is the said text box). But it doesn't seem to work.
What event do you have that code running on?
Tried Me.repaint but still no luck!
The event it's on is timer.
Me.text9.Requery should work... have you compiled your code to see if there are any errors?
Nope, still not working. I have tried compiling and there's definitely no errors. I don't understand it.
have you tried manually running the query the text box is based on after a report has run to verify that the query is performing correctly?
Can you post your db with just the objects needed for the form to function?
I changed the requery command for the text boxes to simply "Me.Requery". It performed correctly, however, there is a flicker to the clock. Might want to increase your timer settings.
Brilliant that seems to work thanks. If I just put it after each report then the timer won't flash either. Thanks again.