hi..
my english maybe wrong.. but hope somebody can understand me :)
[ The scenario]
I did created 3 forms. "MainForm" , "CalForm" , "WaitForm".
On "MainForm", I did put a command button called "Run".
On "CalForm", there were some unbound "text box" which have some calculation
to be done..
On "WaitForm", I did created 5 boxes that will be showed and animated base on timer event
that I set on the form.
I also did put a text labelled " Please Wait" ..
Basically this "WaitForm" will pop up, when "CalForm" is making the calculation
[ The Output/Return Requirement ]
When I click "Run" button at "MainForm", "WaitForm" will pop up
and showed the animated boxes.And at the same time will start open "CalForm"
"WaitForm" will be close when "CalForm" finished the calculation and showed the value
[ Actual output ]
Everything was follow the plan.. :)
But..............
[ The problem facing ]
The box did not animated..
Anybody can help to solve the problem ?
Below are the code that I put on "MainForm" and "WaitForm".
Btw, the timer interval for "WaitForm" is 250 .
----- MainForm ---------------
Option Compare Database
Option Explicit
Private Sub Run_Click()
On Error GoTo Err_iq_Click
DoCmd.Close acForm, "MainForm"
PlsWaitForm ("CalForm")
Exit_Run_Click:
Exit Sub
Err_Run_Click:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Run_Click
End Sub
Function PlsWaitForm(docz As String)
On Error GoTo PlsWaitForm_Err
DoCmd.OpenForm "WaitForm"
DoCmd.RepaintObject acForm, "WaitForm"
DoCmd.OpenForm docz
DoCmd.Close acForm, "WaitForm"
PlsWaitForm_Exit:
Exit Function
PlsWaitForm_Err:
MsgBox Err.Number & " - " & Err.Description
Resume PlsWaitForm_Exit
End Function
------- end MainForm code -------------
----- WaitForm ---------------
Option Compare Database
Option Explicit
Dim countshow As Single
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
countshow = 0
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Form_Open
End Sub
Private Sub Form_Timer()
On Error GoTo Err_Form_Timer
Select Case countshow
Case 0
bx1.Visible = True
countshow = countshow + 1
Case 1
bx2.Visible = True
countshow = countshow + 1
Case 2
bx3.Visible = True
countshow = countshow + 1
Case 3
bx4.Visible = True
countshow = countshow + 1
Case 4
bx5.Visible = True
countshow = countshow + 1
Case 5
ini
countshow = 0
End Select
Exit_Form_Timer:
Exit Sub
Err_Form_Timer:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Form_Timer
End Sub
Function ini()
bx1.Visible = False
bx2.Visible = False
bx3.Visible = False
bx4.Visible = False
bx5.Visible = False
End Function
------- end WaitForm code -------------
thanks in advance