Ranthalion
Jul 18th, 2006, 12:45 PM
Hello,
I am working on an Access app that has a button on a form which changes the contents of a subform and applies a filter to the form in the subform. This all works fine, but the problem I have is that the filter sometimes takes a couple of seconds to complete. I would like to be able to change the cursor to hourglass while the filter is running and then change it back to normal once the filter has completed. Any ideas on which event to use?
By the way, I'm using Access 2003. Here is the code I'm currently using to open the form:
If (cbxNav.Value <> "Please select a destination") Then
If (cbxNav.Value = "Management") Then
Forms("frmMain").Controls("sbfrmContent").SourceObject = "frmManagement"
Else
DoCmd.Hourglass True
Forms("frmMain").Controls("sbfrmContent").SourceObject = "frmDaily"
Forms("frmMain").Controls("sbfrmContent").Form.Filter = "Status = '" & cbxNav.Value & "'"
Forms("frmMain").Controls("sbfrmContent").Form.FilterOn = True
DoCmd.Hourglass False 'this happens too soon
End If
End If
Thanks,
Ranthalion
I am working on an Access app that has a button on a form which changes the contents of a subform and applies a filter to the form in the subform. This all works fine, but the problem I have is that the filter sometimes takes a couple of seconds to complete. I would like to be able to change the cursor to hourglass while the filter is running and then change it back to normal once the filter has completed. Any ideas on which event to use?
By the way, I'm using Access 2003. Here is the code I'm currently using to open the form:
If (cbxNav.Value <> "Please select a destination") Then
If (cbxNav.Value = "Management") Then
Forms("frmMain").Controls("sbfrmContent").SourceObject = "frmManagement"
Else
DoCmd.Hourglass True
Forms("frmMain").Controls("sbfrmContent").SourceObject = "frmDaily"
Forms("frmMain").Controls("sbfrmContent").Form.Filter = "Status = '" & cbxNav.Value & "'"
Forms("frmMain").Controls("sbfrmContent").Form.FilterOn = True
DoCmd.Hourglass False 'this happens too soon
End If
End If
Thanks,
Ranthalion