Cosmos75
Registered User.
- Local time
- Today, 05:01
- Joined
- Apr 22, 2002
- Messages
- 1,281
OK, I've added a field to tblFileName called PW to hold the password for the database.
I want to add code that works like this..
For each file (strFileName??) in tblFileName (No earthly idea how to write code for this!!)
If PW <> "" Then
DBEngine.CompactDatabase strFileName, strFolderPart & strTempFileName, , ";pwd=" & PW
Else
DBEngine.CompactDatabase strFileName, strFolderPart & strTempFileName
End If
Of course then I have to worry about is someone viewing the password in the table. I can just use a PASSWORD input mask in the form and make the tblFileName a Hidden file, not the most secure way but should work against most people, other than someone who is set on mucking up the db file.
Also, I have no idea how this part works. (Just curious on my part)
If IsNull(pstrFileName) Or pstrFileName = "" Then
GoTo exit_section
Else
strFileName = pstrFileName
End If
Where is pstrFileName, that the only time I ever see it, shouldn't it always return a Null value and exit?
(Not that I understand anything of what is going on, mind you!)

I want to add code that works like this..
For each file (strFileName??) in tblFileName (No earthly idea how to write code for this!!)
If PW <> "" Then
DBEngine.CompactDatabase strFileName, strFolderPart & strTempFileName, , ";pwd=" & PW
Else
DBEngine.CompactDatabase strFileName, strFolderPart & strTempFileName
End If
Of course then I have to worry about is someone viewing the password in the table. I can just use a PASSWORD input mask in the form and make the tblFileName a Hidden file, not the most secure way but should work against most people, other than someone who is set on mucking up the db file.
Also, I have no idea how this part works. (Just curious on my part)
If IsNull(pstrFileName) Or pstrFileName = "" Then
GoTo exit_section
Else
strFileName = pstrFileName
End If
Where is pstrFileName, that the only time I ever see it, shouldn't it always return a Null value and exit?
(Not that I understand anything of what is going on, mind you!)

Last edited: