itchyII
MIS
- Apr 10, 2001
- 167
Hello all,
The following is a whole bunch of functions that get called on an 'onclick' event of a button on my form.
______________________________________________
Private Sub Image83_Click()
Dim Text1, Text2, Text3 As String
Dim condition1, condition2 As String
Dim where1, where2, where3 As String
Screen.MousePointer = 11
'check which checkbox is selected and get appropriate query name
qry = CheckSearch()
'unhide form controls
Call unhideSearch(True)
Me.Repaint
'fill search combo boxes with appropriate field names
Call fieldList(qry)
'query all
Call buildQuery(qry)
'set subform
Call setSub
'unhide subform
Me!sub.Visible = True
Screen.MousePointer = 0
End Sub
______________________________________________
The processing time for these functions to finish is anywhere from 5 to 15 seconds. This is still long enough for the user to jump the gun on their next process without waiting for the first finish, which could cause problems. I am trying to find a way to have the hourglass displayed until all of these functions have been completed but the problem is that Access changes the mousepointer to an hourglass and then immediately changes it back without waiting for all the code in between to finish running. I tried moving the Screen.MousePointer, and placing it inside of the last function called but it still doesn't work. I tried adding DoEvents in a few places but that didn't work either. Does anyone know a way of achieving this?
Itchy
The following is a whole bunch of functions that get called on an 'onclick' event of a button on my form.
______________________________________________
Private Sub Image83_Click()
Dim Text1, Text2, Text3 As String
Dim condition1, condition2 As String
Dim where1, where2, where3 As String
Screen.MousePointer = 11
'check which checkbox is selected and get appropriate query name
qry = CheckSearch()
'unhide form controls
Call unhideSearch(True)
Me.Repaint
'fill search combo boxes with appropriate field names
Call fieldList(qry)
'query all
Call buildQuery(qry)
'set subform
Call setSub
'unhide subform
Me!sub.Visible = True
Screen.MousePointer = 0
End Sub
______________________________________________
The processing time for these functions to finish is anywhere from 5 to 15 seconds. This is still long enough for the user to jump the gun on their next process without waiting for the first finish, which could cause problems. I am trying to find a way to have the hourglass displayed until all of these functions have been completed but the problem is that Access changes the mousepointer to an hourglass and then immediately changes it back without waiting for all the code in between to finish running. I tried moving the Screen.MousePointer, and placing it inside of the last function called but it still doesn't work. I tried adding DoEvents in a few places but that didn't work either. Does anyone know a way of achieving this?
Itchy