password using macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I would like to create a macro that asks user for password before opening another form upon a click of a command button. Is this possible with a macro?

Or maybe some VBA code that asks for password and opens the form with correct password entered? Thanks for any help!

Regards,
Sam
 
Hi Sam,

Here's a piece of sample VBA code:

Dim PassStr As String
PassStr = InputBox("Enter Password Please", "My Password Prompt")

IF PassStr = "Correct Password" THEN
DoCmd.OpenForm "MyForm"
ELSE
Msgbox "Wrong Password Entered"
END IF

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: password using macro
| thread-index: AcRwYfy1iXxaACfsS+e3ZvX2irtyGA==
| X-WBNR-Posting-Host: 219.89.124.69
| From: "=?Utf-8?B?U2FtIEt1bw==?=" <[email protected].(donotspam)>
| Subject: password using macro
| Date: Thu, 22 Jul 2004 20:06:02 -0700
| Lines: 9
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.157
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:12288
| X-Tomcat-NG: microsoft.public.access.security
|
| Hi,
| I would like to create a macro that asks user for password before opening
another form upon a click of a command button. Is this possible with a
macro?
|
| Or maybe some VBA code that asks for password and opens the form with
correct password entered? Thanks for any help!
|
| Regards,
| Sam
|
|
|
 
Back
Top