J
Jim
I'we made this simple app in Visual Basic that copies my database to another
location (backup). I have a commandbutton on my main (Access) form with the
code below. However, if I run the copy utility on it's own then it works ok,
i.e. the database gets copied (backuped) to another place. But when I run it
from this button then I get "Run-Time Error "53": File not found. Is Access
somehow still up and running or what am I doing wrong?
Secondly, the database and the backup utility will always be in the same
directory. Is there a way to get the path to the backup app instead of like
in the code below (which will not find the app if for example the database
directory is moved to another location)? Jim.
Private Sub cmd_open_backup_Click()
Dim RetVal
If MsgBox("Are you sure you want to quit?", vbYesNo) = vbYes Then
RetVal = Shell("C:\Documents and Settings\MyComputer\Desktop\backup.exe",
vbNormalFocus)
Application.Quit
End If
End Sub
location (backup). I have a commandbutton on my main (Access) form with the
code below. However, if I run the copy utility on it's own then it works ok,
i.e. the database gets copied (backuped) to another place. But when I run it
from this button then I get "Run-Time Error "53": File not found. Is Access
somehow still up and running or what am I doing wrong?
Secondly, the database and the backup utility will always be in the same
directory. Is there a way to get the path to the backup app instead of like
in the code below (which will not find the app if for example the database
directory is moved to another location)? Jim.
Private Sub cmd_open_backup_Click()
Dim RetVal
If MsgBox("Are you sure you want to quit?", vbYesNo) = vbYes Then
RetVal = Shell("C:\Documents and Settings\MyComputer\Desktop\backup.exe",
vbNormalFocus)
Application.Quit
End If
End Sub