...and bear in mind that, unless you lock the file into an
mde, it's possible (and pretty easy for the initiated) to hack through
it.
Tom Oakes
Personal PC Consultants, Inc.
[EMAIL PROTECTED]
503.230.0911 (O)
402.968.6946
(C)
734.264.0911 (F)
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of jmw95823
Sent: Tuesday, August 09, 2005 7:45 AM
To: [email protected]
Subject: [AccessDevelopers] Re: How to set up a password for a button on the switch board?
insert following code into it. Place textbox and cancel button on
it. Open this form with the button on your main menu. Jim
Option Compare Database
Option Explicit
Sub btnCancel_Click()
On Error GoTo Err_btnCancel_Click
If btncancel.Caption = "Cancel" Then
DoCmd.Close
Else
If btncancel.Caption = "Continue" Then
DoCmd.Close
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPasswordProtectedForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End If
Exit_btnCancel_Click:
Exit Sub
Err_btnCancel_Click:
MsgBox Err.Description
Resume Exit_btnCancel_Click
End Sub
Sub btnPasswordProtectedFormButton_Click()
On Error GoTo Err_btnPasswordProtectedFormButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPasswordProtectedForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btnPasswordProtectedFormButton_Click:
Exit Sub
Err_btnPasswordProtectedFormButton_Click:
MsgBox Err.Description
Resume Exit_btnPasswordProtectedFormButton_Click
End Sub
Private Sub txtPassword_AfterUpdate()
If txtPassword.Value = "password" Then
btncancel.Caption = "Continue"
btnCancel_Click
Else
btncancel.Caption = "Cancel"
End If
End Sub
Hope that helps.
--- In [email protected], "iamnannan"
<[EMAIL PROTECTED]> wrote:
> Dear All,
>
> Does anyone know how to set up a password for a command button on
the
> Main Switch Board? Thank you for your help
>
> Nan
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
| Microsoft access database | Microsoft access developer | Microsoft access |
| Microsoft access database design | Microsoft access database training |
YAHOO! GROUPS LINKS
- Visit your group "AccessDevelopers" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
