Using SaveFileDialog to backup database files
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
Need to write VB code to save application DataBases (Access) to another location of the users choice. Need help coding using SaveFileDialog control. Thanks. Gib5531
-
Need to write VB code to save application DataBases (Access) to another location of the users choice. Need help coding using SaveFileDialog control. Thanks. Gib5531
Try this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformssavefiledialogclasstopic.asp[^] Or you could google it. Or if you were most specific about what you need help with... From what I understand of your situation, your code would look something like this:
With SaveFileDialog1 .Filter = "Microsoft Access Database (\*.mdb)|\*.mdb" .RestoreDirectory = True .DefaultExt = "mdb" .AddExtension = True .OverwritePrompt = True If .ShowDialog() = Windows.Forms.DialogResult.OK Then System.IO.File.Copy(strOriginalFileName, .FileName) End If End With