Design Questions - file system layout

jgoulart

Board Regular
Joined
Feb 16, 2002
Messages
62
I have made an invoice application that has a file for a database that captures customer data, invoice numbers with specific order histories of price, part numbers, tax, shipping handling, and discounts.

My application is initiated by an excel file that checks for a password and on pass it opens the invoice application. If the database is not detectected it will copy a blank database to the name of the database that was not detected. ( I do this to protect someone from inadvertantly erasing the database by re-running the installation)(I'm not sure if I'm creating a potential disaster with this operation by somehow copying the blank database to the existing database on some potential error that it doesn't correctly check that the file exists. I am using :

Private Sub Workbook_Open()
Dim tname As String
Dim str As String
Dim red
Dim SourceFile, DestinationFile
SourceFile = "c:igsproigspdbt.xls" ' Define source file name.
DestinationFile = "c:igsproigspdb.xls" ' Define target file name.

setvars
If Len(Dir("c:igsproigspdb.xls")) < 1 Then
FileCopy SourceFile, DestinationFile ' Copy source to target.
End If
tname = ThisWorkbook.Name
Sheets("sheet2").Activate
If CheckSysPass() = False Then
EnterPassword.Show
End If

'fname1 = "igsprol01s.xls"
'On Error Resume Next
Workbooks.Open Filename:=dBpath1 & fname1
Workbooks(fname1).Activate
On Error GoTo jumping
jumping:
red = red + 1
Workbooks(tname).Close savechanges:=False

End Sub


to accomplish this)

That is my first question to basically see if I am using a risky technique to prevent overwriting my main database.

My next question is regarding creating some sort of user initiated or automatic backup of the database file. Is there some place that I might look at some typical examples of some common methods of backing up data?

And finally what kind of recommendations might you have as far as creating an archive file or how big should I let the database file get before I should consider breaking it up into separate files. I realize that a lot of these questions are very dependent on how I handle the data but I guess I'm just looking for some typical guidelines of file size and such items.

Thanks in advance for all of your input.

John
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top