I have been asked to develop an application in Access for work. This application must have a simple user interface because the folks using it are not "database people" - their words, not mine.
One of the "screens" they want to see will display a progress bar. I created the "screen" in a form. I do not currently have it bound to any data because it is not intended to display any records. It's sole purpose is to show the progress bar (and some text describing what it's doing) while visual basic does some magic in the background.
Here is the issue I'm having. If I put my code into the onclick event of a button, everything works fine - exactly how I want it to.
If I put my code into the forms onload event, the code executes prior to the form being displayed - as expected, right? But we want to see the progress bar change as VBA does its deal. Because the form hasn't been displayed yet, you just wait until VBA is done, and then get the form displayed showing a full progress bar and text indicating that VBA is finished with its job. So onload is definitely not where I want the code. - Please note that the form actually hasn't displayed yet, so repainting the form won't help here.
But if I put the code into the forms onactivate event, nothing happens. The form is displayed, but the code never executes.
I understand that onload fires prior to the display of the form. onactivate supposedly fires after the form is displayed (and I guess it can fire after that too depending upon focus, etc.). But even if I put some very simple code in the onactivate event - like msgbox ("Hi there.") - , nothing happens.
I thought maybe the form had to have a record source for onactivate to fire, so I've tried actually binding the form to a record source, but it didn't help. Then I tried actually displaying a record from that record source on the form, but it didn't help. I simply can't seem to get the onactivate event to fire.
What am I missing? I'm sure it is something rediculously simple and I'll go ahead and apologize for being a big dummy. But I'm stumped and would really appreciate some help.
For now, I'm just going to make them click the button to get it all started until I get this thing figured out. Thanks in advance for helping to push back my ignorance!