Incorrect display

  • Thread starter Thread starter Moff
  • Start date Start date
M

Moff

Hi,
When I start my program (Access 2007), I use a form with a background
picture and nothing else, while the program makes some work (50 seconds) with
the data. This work is invisible to the user. The problem is the form don't
display correctly. I found a temporary solution that I don't like. I force a
message to be written to the form with MsgBox. Then the form and the
background picture are ok. Is it another way to achieve that without using
MsgBox (because the user must clic on it to close it) ?
I use these two lines of code followed by some invisible work to the data.

DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.Maximize
....
invisible work to the data

Thank you!
 
Please try the following:-

in Form_Load() event
me.TimerInterval = 50000
Doevents
<the code you want to run in background>

in Form_Timer() event
docmd.openform <the main form you want to display>
docmd.close acform, me.name

HTH
KS
 
Moff said:
When I start my program (Access 2007), I use a form with a background
picture and nothing else, while the program makes some work (50 seconds) with
the data. This work is invisible to the user. The problem is the form don't
display correctly. I found a temporary solution that I don't like. I force a
message to be written to the form with MsgBox. Then the form and the
background picture are ok. Is it another way to achieve that without using
MsgBox (because the user must clic on it to close it) ?
I use these two lines of code followed by some invisible work to the data.

DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.Maximize
...
invisible work to the data


I haven't used A2007 yet, but I suspect that adding one or
two DoEvents will make the message box unecessary.
 
Back
Top