Set Hrglass to run from Switchboard

G

Guest

I can not seem to get an hourglass to work when an item is selected from the switchboard. The switchboard was created using the switchboard manager; I have a few forms that take a bit to open and would like to add an hourglass to the onclick event. Am I adding the code in the wrong place, or is it just not possible when using the switchboard manager's code

Here is the slice of code where I "think" the docmd.hourglass true statement should appear. Any suggestions or help on this would be greatly appreciated - at this point I am about bald :-

Private Function HandleButtonClick(intBtn As Integer
....... ' Run code
Case conCmdRunCod
'Application.Run rs![Argument
DoCmd.Hourglass Tru
Dim strArg As Strin
strArg = Trim("" & rs![Argument]
intNumOfDelimitedArgs = xg_CountDelimitedStrings(strArg, ";"
Select Case intNumOfDelimitedArg
Case
Application.Run strAr
Case
Application.Run xg_GetSubString(strArg, 1, ";"),
xg_GetSubString(strArg, 2, ";")
 
T

TKD Karen

I would put it as the first command in the function. Remember to set the
hourglass to false at the end of the function. If it still doesn't work,
try stepping through the code by putting a break (click on the left of the
line and it will be highlighted in red - doesn't work on comments or Dim
statements) and pressing F8 to move to each command after the break.

Karen

Cathi said:
I can not seem to get an hourglass to work when an item is selected from
the switchboard. The switchboard was created using the switchboard manager;
I have a few forms that take a bit to open and would like to add an
hourglass to the onclick event. Am I adding the code in the wrong place, or
is it just not possible when using the switchboard manager's code?
Here is the slice of code where I "think" the docmd.hourglass true
statement should appear. Any suggestions or help on this would be greatly
appreciated - at this point I am about bald :)
Private Function HandleButtonClick(intBtn As Integer)
...... ' Run code.
Case conCmdRunCode
'Application.Run rs![Argument]
DoCmd.Hourglass True
Dim strArg As String
strArg = Trim("" & rs![Argument])
intNumOfDelimitedArgs = xg_CountDelimitedStrings(strArg, ";")
Select Case intNumOfDelimitedArgs
Case 1
Application.Run strArg
Case 2
Application.Run xg_GetSubString(strArg, 1, ";"), _
xg_GetSubString(strArg, 2, ";")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top