P
PeterM
I'm using AC2003. I have FormA which has two subform controls on it which do
not have a SourceObject assigned to them. I do that in the form_open event,
see below. What I'm trying to do is to open a simple OneMomentPlease form
that has several colored labels used to indicate progress. As I understand
it, a DoEvents statement should force all statements prior to it to execute
before any following statements to execute. However, it's not working that
way. When FormA is opened it runs through all statements. Each sourceobject
contains a fairly complex chart and takes 3-5 seconds to open each one. I
want to let users know that the system is working and not waiting for them.
Any help would be appreciated.
Private Sub Form_Open(Cancel As Integer)
Me.Child1.SourceObject = "chartcarbs"
DoCmd.OpenForm "OneMomentPlease", acNormal, , , acFormEdit
Forms!OneMomentPlease.Form!Label5.Visible = True
DoCmd.RepaintObject acForm, "OneMomentPlease"
DoEvents
Me.Child2.SourceObject = "chartcalories"
Forms!OneMomentPlease.Form!Label6.Visible = True
DoCmd.RepaintObject acForm, "OneMomentPlease"
DoCmd.Close acForm, "OneMomentPlease"
DoEvents
End Sub
not have a SourceObject assigned to them. I do that in the form_open event,
see below. What I'm trying to do is to open a simple OneMomentPlease form
that has several colored labels used to indicate progress. As I understand
it, a DoEvents statement should force all statements prior to it to execute
before any following statements to execute. However, it's not working that
way. When FormA is opened it runs through all statements. Each sourceobject
contains a fairly complex chart and takes 3-5 seconds to open each one. I
want to let users know that the system is working and not waiting for them.
Any help would be appreciated.
Private Sub Form_Open(Cancel As Integer)
Me.Child1.SourceObject = "chartcarbs"
DoCmd.OpenForm "OneMomentPlease", acNormal, , , acFormEdit
Forms!OneMomentPlease.Form!Label5.Visible = True
DoCmd.RepaintObject acForm, "OneMomentPlease"
DoEvents
Me.Child2.SourceObject = "chartcalories"
Forms!OneMomentPlease.Form!Label6.Visible = True
DoCmd.RepaintObject acForm, "OneMomentPlease"
DoCmd.Close acForm, "OneMomentPlease"
DoEvents
End Sub