Hi Joop:
You can never fully keep a hacker out of Access, but with the right tweeks
you can keep 98% of folks out. You could do the following:
1) Hide the access tables altogether, especially if you have Word getting
the data from Access rather than vice versa. In Word you can use the VBA
environment to do this. In fact, you can even bring up stuff from an Access
table without even opening up Access. Example, the following code needs
Access open:
DoCmd.RunSql "SELECT Medications.* FROM Medications WHERE MEDICATIONS.ACCT =
" & [ACCT] & " ORDER BY Medications.ACCT;"
But the following doesn't:
Set db = OpenDatabase(conDBpath)
' Retrieve the recordset
Set rs = db.OpenRecordset("SELECT Medications.* FROM Medications WHERE
MEDICATIONS.X = -1 ORDER BY Medications.md1;")
' Determine the number of retrieved records
On Error Resume Next
With rs
.MoveLast
NoOfRecords = .RecordCount
.MoveFirst
' Set the number of Columns = number of Fields in recordset
ListBox1.ColumnCount = .Fields.Count
' Load the ListBox with the retrieved records
ListBox1.Column = .GetRows(NoOfRecords)
' Cleanup
.Close
db.Close
End With
tt = "0 in"
uu = "0 in"
vv = "1.2 in"
ww = "1.4 in"
XXX = "0 in"
yy = "0.6 in"
zz = "0.6 in"
aa = "3.8 in"
ListBox1.ColumnWidths = tt & ";" & uu & ";" & vv & ";" & ww & ";" & XXX
& ";" & yy & ";" & zz
ListBox1.ListWidth = aa
In Access you can place the following code into your startup module:
'If DATE > #12/1/2004# Then ' I can use this to make my application
time controlled.
'Application.Quit acQuitSaveAll
'End If
'ChangeProperty "StartupShowDBWindow", dbBoolean, False
'ChangeProperty "StartupShowStatusBar", dbBoolean, False
'ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
'ChangeProperty "AllowFullMenus", dbBoolean, True
'ChangeProperty "AllowBreakIntoCode", dbBoolean, False
'ChangeProperty "AllowSpecialKeys", dbBoolean, True
'ChangeProperty "AllowBypassKey", dbBoolean, False
ChangeProperty "confirmrecordchanges", dbBoolean, False
ChangeProperty "confirmdocumentdeletions", dbBoolean, False
ChangeProperty "confirmactionqueries", dbBoolean, False
Call MultiAccess.winCheckMultipleInstances(False)
AddAppProperty "AppTitle", dbText, "Zfile Medical Database System"
Application.RefreshTitleBar
'Application.SetOption tobreakonerrors, 2
Exit Sub
(note that I have placed a single quote mark before most lines- if you get
rid of these, you'll never be able to see your stuff again... so be careful
and make backups!)
If you need further help with any of these 2 methods, ask for further
detailed followup..
Regards,
Al