Looping through all records in a table, I would like to pause for a random amount of time between each record.
Currently, I am generating a random number and calling a function that looks like this:Public Sub SleepVBA(Seconds)Dim sSecondssSeconds = Seconds * 1000Sleep sSeconds '1000 implements a 1 second delay
End Sub
But the program becomes unresponsive. How can I have this time delay but still see updates that I am writing to a text box on the main form?
Thank you.
Edit: I found this... is this the best solution?
https://www.fmsinc.com/microsoftacce...idDoEvents.asp