I would have thought the lines in a sub are executed in order, but I have a sub which updates the data in a list as such:
sub anexample()
me.statusbox = "Please wait..."
me.listbox1.rowsource = "Select blah blah blah"
me. statusbox = ""
End sub
Theroetically, I would have thought it would display the message in my text box called statusbox, then run the select statement (which takes about 10-15 seconds) and once it has done this, it will update the text box again.
But, instead, it seems to run everything at once, and it fetches the data before displaying the text in the textbox (have tried running without the last line to confirm this).
Is there any way to stop this?
sub anexample()
me.statusbox = "Please wait..."
me.listbox1.rowsource = "Select blah blah blah"
me. statusbox = ""
End sub
Theroetically, I would have thought it would display the message in my text box called statusbox, then run the select statement (which takes about 10-15 seconds) and once it has done this, it will update the text box again.
But, instead, it seems to run everything at once, and it fetches the data before displaying the text in the textbox (have tried running without the last line to confirm this).
Is there any way to stop this?