Stevehewitt
IS-IT--Management
Hey ppl,
i have a autoexec module which loads at startup. Goes like so:
Option Compare Database
Function AutoExec()
'Opens splashscreen for 4 seconds, closes, then opens switchboard
Dim lngPauseTime As Long
Dim lngStartTime As Long
'Loads up the status bar
varReturn = SysCmd(SYSCMD_INITMETER, "Please wait, loading ODBC connections", 20)
For intRecNum = 1 To 10
varReturn = SysCmd(SYSCMD_UPDATEMETER, intRecNum)
'updates the status from nothing to half
'Move to next record
Next intRecNum
DoCmd.OpenForm "frmSplash"
Forms!frmSplash.Repaint 'Opens splashscreen
lngPauseTime = 3 'Sets delay time
lngStartTime = Timer 'Get current time
Do While Timer < lngStartTime + lngPauseTime 'Wait
Loop
For intRecNum = 10 To 20
varReturn = SysCmd(SYSCMD_UPDATEMETER, intRecNum)
'Updates the status from half to full
'Move to next record
Next intRecNum
DoCmd.OpenForm "Switchboard" 'Opens switchboard
DoCmd.Close acForm, "frmSplash" 'Close splash
'Clears the status bar
varReturn = SysCmd(SYSCMD_SETSTATUS, " "![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End Function
When I run the application it starts and then saids that theres an error accessing the file, the network connection may of been lost.
The only file that this code relies on is the switchboard form and the splash screen frmSplash. These are both there and avaliable.
Any ideas? Its all on one file stored on the local machine, so its not a network issue.
Thanks in advance,
Steve Hewitt
Systems Manager
i have a autoexec module which loads at startup. Goes like so:
Option Compare Database
Function AutoExec()
'Opens splashscreen for 4 seconds, closes, then opens switchboard
Dim lngPauseTime As Long
Dim lngStartTime As Long
'Loads up the status bar
varReturn = SysCmd(SYSCMD_INITMETER, "Please wait, loading ODBC connections", 20)
For intRecNum = 1 To 10
varReturn = SysCmd(SYSCMD_UPDATEMETER, intRecNum)
'updates the status from nothing to half
'Move to next record
Next intRecNum
DoCmd.OpenForm "frmSplash"
Forms!frmSplash.Repaint 'Opens splashscreen
lngPauseTime = 3 'Sets delay time
lngStartTime = Timer 'Get current time
Do While Timer < lngStartTime + lngPauseTime 'Wait
Loop
For intRecNum = 10 To 20
varReturn = SysCmd(SYSCMD_UPDATEMETER, intRecNum)
'Updates the status from half to full
'Move to next record
Next intRecNum
DoCmd.OpenForm "Switchboard" 'Opens switchboard
DoCmd.Close acForm, "frmSplash" 'Close splash
'Clears the status bar
varReturn = SysCmd(SYSCMD_SETSTATUS, " "
End Function
When I run the application it starts and then saids that theres an error accessing the file, the network connection may of been lost.
The only file that this code relies on is the switchboard form and the splash screen frmSplash. These are both there and avaliable.
Any ideas? Its all on one file stored on the local machine, so its not a network issue.
Thanks in advance,
Steve Hewitt
Systems Manager