Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Help with some ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 16 Topic 30170 of 30660
Post > Topic >>

Help with some VB Code

by colemanj4 <colemanj4@[EMAIL PROTECTED] > May 5, 2008 at 12:07 PM

Here is what I have so far, it loops while the PW is incorrect, or
until cancel is selected. I want it to lock the tables for adds,
deletes, and edits when cancel is selected, and if the PW is correct.

I want this to run when the DB is opened, I would also like the text
box to be starred (*) out when text is input.

Thanks for your help.

==============================
 Dim Show_Box As Boolean
    Dim Response As String

    ' Set the Show_Dialog variable to True.
    Show_Box = True
InputBox
    ' Begin While loop.
    While Show_Box = True

        ' Show the input box.
        Response = InputBox("Enter the Password to Unlock Read-Only
Mode.", _
            "Read-Only Unlocking")
        ' See if Cancel was pressed.
        If Response = "" Then

            ' If Cancel was pressed,
            ' break out of the loop.
            Show_Box = False


        Else
            ' Test Entry to find out if it is the correct password.
            If "safety" = Response = True Then
                'Application.CloseCurrentDatabase
                'Application.DBEngine.OpenDatabase "P:\ACTION REGISTER
\TESTERIncidet Action Register Database.mdb", , True
                'Application.OpenCurrentDatabase "P:\ACTION REGISTER
\TESTERIncidet Action Register Database.mdb", False
                'Access.AcOpenDataMode.acReadOnly
                Show_Box = False
            Else
                ' If the entry was wrong, show an error message.
                MsgBox "Wrong Password, Try again."
            End If
        End If
      ' End the While loop.
      Wend
==============================================
 




 16 Posts in Topic:
Help with some VB Code
colemanj4 <colemanj4@[  2008-05-05 12:07:44 
Re: Help with some VB Code
Rich P <rpng123@[EMAIL  2008-05-05 18:04:44 
Re: Help with some VB Code
"Albert D. Kallal&qu  2008-05-06 06:00:43 
Re: Help with some VB Code
Tom van Stiphout <no.s  2008-05-06 06:54:15 
Re: Help with some VB Code
Rich P <rpng123@[EMAIL  2008-05-06 10:17:49 
Re: Help with some VB Code
Rich P <rpng123@[EMAIL  2008-05-06 11:37:35 
Re: Help with some VB Code
"Albert D. Kallal&qu  2008-05-07 01:51:06 
Re: Help with some VB Code
Rich P <rpng123@[EMAIL  2008-05-07 10:32:35 
Re: Help with some VB Code
colemanj4 <colemanj4@[  2008-05-06 05:34:46 
Re: Help with some VB Code
"Albert D. Kallal&qu  2008-05-07 01:56:43 
Re: Help with some VB Code
Element <mhammer@[EMAI  2008-05-06 05:38:35 
Re: Help with some VB Code
lyle fairfield <lyle.f  2008-05-07 03:47:15 
Re: Help with some VB Code
lyle fairfield <lylefa  2008-05-07 11:01:31 
Re: Help with some VB Code
colemanj4 <colemanj4@[  2008-05-07 06:10:11 
Re: Help with some VB Code
lyle fairfield <lylefa  2008-05-07 13:29:24 
Re: Help with some VB Code
colemanj4 <colemanj4@[  2008-05-07 11:12:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 16:42:48 CDT 2008.