Hi Dennis
thanks for helping me - I just have one problem because the hour glass
doesn't dissappear after finishing. I have the following code:
****************************************
Private Sub cmdTransfer_Click()
On Error GoTo Err_Handler
Dim strTargetDB As String
Dim strTargetTable As String
Dim strSQL As String
DoCmd.Hourglass True
strTargetDB = "C:\Documents and Settings\Klaus
Müller\Desktop\cps208web\transferdb.mdb"
strTargetTable = "webtotalbalancebie30p"
With CurrentDb
strSQL = _
"DELETE FROM [" & strTargetTable & "] " & _
"IN '" & _
strTargetDB & "';"
.Execute strSQL, dbFailOnError
strSQL = _
"INSERT INTO [" & strTargetTable & _
"](accountnumber, initialinvestment, guaranteedequity,
monthstartingbalance, optionpl, SumOfcontractvalue, optioncommission,
commission, managementfeebasic, Incentivefeetotal, electronicfee, vat,
adjustment, netliquidationbalance, paidoptionpremium, optionvalue,
SumOfopenpl, SumOfinitialmargin, SumOfmaintenancemargin, opentradebalance) IN
'" & _
strTargetDB & _
"' SELECT webtotalbalancebie30p.accountnumber,
webtotalbalancebie30p.initialinvestment,
webtotalbalancebie30p.guaranteedequity,
webtotalbalancebie30p.monthstartingbalance, webtotalbalancebie30p.optionpl,
webtotalbalancebie30p.SumOfcontractvalue,
webtotalbalancebie30p.optioncommission, webtotalbalancebie30p.commission,
webtotalbalancebie30p.managementfeebasic,
webtotalbalancebie30p.incentivefeetotal, webtotalbalancebie30p.electronicfee,
webtotalbalancebie30p.vat, webtotalbalancebie30p.adjustment,
webtotalbalancebie30p.netliquidationbalance,
webtotalbalancebie30p.paidoptionpremium, webtotalbalancebie30p.optionvalue,
webtotalbalancebie30p.SumOfopenpl, webtotalbalancebie30p.SumOfinitialmargin,
webtotalbalancebie30p.SumOfmaintenancemargin,
webtotalbalancebie30p.opentradebalance " & _
"FROM webtotalbalancebie30p;"
CurrentDb.Execute strSQL, dbFailOnError
End With
-------------------- the is a lot more and in the end I have
-------------------------
Exit_Point:
Exit Sub
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
Resume Exit_Point
DoCmd.Hourglass False
End Sub
*************************************************
Can you tell me what I am doing wrong?
Thanks
Klaus
Dennis said:
If you are using a macro to execute your commands then place the line
Hourglass with the option of yes at the beginning and Hourglass with option
of No at the end.
If you are using VBA code then place
DoCmd.Hourglass True at the beginning of your routine and DoCmd.Hourglass
False at the end of the routine.
Be aware that if your code breaks with an error during your routines, your
cursor will remain as an hourglass unless you have an error trap to reset it.
:
Dear Sirs
I'm executing with a command button on a form many commands.
Is there a possibility to show, with help of a "egg-watch" (I don't now the
correct word for it - it's just a litural translation from German), to show
when the commands are finished?
Thanks for any help
Klaus