Back up On exit..H..E..L..P!
Hiya,
I have created a program on Access; & now i would like to make it do a back up of the Mdb. So I figure since it can't do a backup while its "active" it should do it when unloading..
-Module-
The thing is that I have little expiriance on Access, But some good on VB, so I pasted this code I used on VB, It should have worked. If i can find how to add refreceses
I get two errors on the frist two lines, and I bet a few more After those.
How can I unload the program using code?? And if anyone can tell me If this coding is apropriate for this?? Also whats this Compact database I be seeing??-whats it all about?
Thank you
Hiya,
I have created a program on Access; & now i would like to make it do a back up of the Mdb. So I figure since it can't do a backup while its "active" it should do it when unloading..
-Module-
Code:
Funtion Mnu_Exit()
Unload ME
Screen.MousePointer = vbHourglass
Dim fso As New FileSystemObject
Dim pathfrom As String, pathto As String
pathfrom = App.Path & "\cabrera.mdb"
pathto = App.Path & "\cabrera.bak"
fso.CopyFile pathfrom, pathto
Set fso = Nothing
End Funtion
The thing is that I have little expiriance on Access, But some good on VB, so I pasted this code I used on VB, It should have worked. If i can find how to add refreceses
I get two errors on the frist two lines, and I bet a few more After those.
How can I unload the program using code?? And if anyone can tell me If this coding is apropriate for this?? Also whats this Compact database I be seeing??-whats it all about?
Thank you
Last edited: