StellaIndigo
IS-IT--Management
Hi
I'm having problems with getting the cursor to change from the pointer to hourglass and back again.
I'm using Access 2002 with Service Pack 3
The following code is called from an OnClick event from a form "Form_SwitchBoard". The code does run, as it loads data into a table then deletes the import file. The DoCmd.Hourglass HourglassOn command does not work. The cursor stays as pointer.
Any ideas?
Stella
Regards
Stella
There are 10 types of people in the world. Those that understand binary and those that don't.
I'm having problems with getting the cursor to change from the pointer to hourglass and back again.
I'm using Access 2002 with Service Pack 3
The following code is called from an OnClick event from a form "Form_SwitchBoard". The code does run, as it loads data into a table then deletes the import file. The DoCmd.Hourglass HourglassOn command does not work. The cursor stays as pointer.
Code:
Sub LoadXMLFiles()
DoCmd.Hourglass HourglassOn
DoCmd.SetWarnings False
Set fs = Application.FileSearch
On Error GoTo ErrorHandler
DoEvents
With fs
.LookIn = "c:\temp\"
.filename = "*.xml"
If .Execute(msoSortByLastModified, msoSortOrderAscending) > 0 Then
For i = 1 To .FoundFiles.Count
Form_Switchboard.lblloading.Caption = .FoundFiles(i)
Form_Switchboard.Refresh
Application.ImportXML DataSource:=.FoundFiles(i), ImportOptions:=acAppendData
Kill .FoundFiles(i)
Next i
End If
End With
GoTo tidyup
ErrorHandler:
MsgBox Err.Number & " " & Err.Description & " with file " & fs.FoundFiles(i), vbOKOnly
tidyup:
Form_Switchboard.lblloading.Caption = ""
DoCmd.SetWarnings True
DoCmd.Hourglass False
End Sub
Any ideas?
Stella
Regards
Stella
There are 10 types of people in the world. Those that understand binary and those that don't.