N
Nick T
Hi,
I have a database for which i want to make difficult for users to alter -
without going over the top.
What i find is a great way (and suitable for my use) is to change the
settings in the 'Tools - Start up' menu and 'uncheck' all the tick boxes and
set a specific form to open when the db is loaded. Iv done this and all
works great! However...... on one of my forms, i have a cmd button which
prints a form. But when this is clicked my main Database Window (which was
hidden) appears, my form is printed and then my Database Window remains
showing - this then would allow for people to tinker with my db!!
Any suggestions on how i can get around this problem??
For info, the code behind my cmd button is:
Private Sub Command55_Click()
On Error GoTo Err_Command55_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "Line1"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Exit_Command55_Click:
Exit Sub
Err_Command55_Click:
MsgBox Err.Description
Resume Exit_Command55_Click
End Sub
Any suggestions greatly appreciated.
Many thanks
I have a database for which i want to make difficult for users to alter -
without going over the top.
What i find is a great way (and suitable for my use) is to change the
settings in the 'Tools - Start up' menu and 'uncheck' all the tick boxes and
set a specific form to open when the db is loaded. Iv done this and all
works great! However...... on one of my forms, i have a cmd button which
prints a form. But when this is clicked my main Database Window (which was
hidden) appears, my form is printed and then my Database Window remains
showing - this then would allow for people to tinker with my db!!
Any suggestions on how i can get around this problem??
For info, the code behind my cmd button is:
Private Sub Command55_Click()
On Error GoTo Err_Command55_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "Line1"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Exit_Command55_Click:
Exit Sub
Err_Command55_Click:
MsgBox Err.Description
Resume Exit_Command55_Click
End Sub
Any suggestions greatly appreciated.
Many thanks