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 > Re: Help with s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 16 Topic 30170 of 31596
Post > Topic >>

Re: Help with some VB Code

by colemanj4 <colemanj4@[EMAIL PROTECTED] > May 6, 2008 at 05:34 AM

On May 5, 3:07=A0pm, colemanj4 <colema...@[EMAIL PROTECTED]
> wrote:
> 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.
>
>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> =A0Dim Show_Box As Boolean
> =A0 =A0 Dim Response As String
>
> =A0 =A0 ' Set the Show_Dialog variable to True.
> =A0 =A0 Show_Box =3D True
> InputBox
> =A0 =A0 ' Begin While loop.
> =A0 =A0 While Show_Box =3D True
>
> =A0 =A0 =A0 =A0 ' Show the input box.
> =A0 =A0 =A0 =A0 Response =3D InputBox("Enter the Password to Unlock
Read-O=
nly
> Mode.", _
> =A0 =A0 =A0 =A0 =A0 =A0 "Read-Only Unlocking")
> =A0 =A0 =A0 =A0 ' See if Cancel was pressed.
> =A0 =A0 =A0 =A0 If Response =3D "" Then
>
> =A0 =A0 =A0 =A0 =A0 =A0 ' If Cancel was pressed,
> =A0 =A0 =A0 =A0 =A0 =A0 ' break out of the loop.
> =A0 =A0 =A0 =A0 =A0 =A0 Show_Box =3D False
>
> =A0 =A0 =A0 =A0 Else
> =A0 =A0 =A0 =A0 =A0 =A0 ' Test Entry to find out if it is the correct
pass=
word.
> =A0 =A0 =A0 =A0 =A0 =A0 If "safety" =3D Response =3D True Then
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'Application.CloseCurrentDatabase
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'Application.DBEngine.OpenDatabase
"P:\ACT=
ION REGISTER
> \TESTERIncidet Action Register Database.mdb", , True
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'Application.OpenCurrentDatabase
"P:\ACTIO=
N REGISTER
> \TESTERIncidet Action Register Database.mdb", False
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'Access.AcOpenDataMode.acReadOnly
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Show_Box =3D False
> =A0 =A0 =A0 =A0 =A0 =A0 Else
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ' If the entry was wrong, show an error
me=
ssage.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MsgBox "Wrong Password, Try again."
> =A0 =A0 =A0 =A0 =A0 =A0 End If
> =A0 =A0 =A0 =A0 End If
> =A0 =A0 =A0 ' End the While loop.
> =A0 =A0 =A0 Wend
>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

OK, since what I want to do doesn't seem possible, is there a way I
could set the current user to user level access instead of admin? I
don't want ot get into doing all of the security wizard access has, as
I have tried it multiple times and it is not working. I believe that
is because of the way my cor****ate IT has the permissions set up for
the whole network, and they are a pain to get involved with.

So... say doej is the user, he opens up the DB, and is asked for a
password, he hits cancel and I then want to delegate him to the "User
group" which only has readonly access. Can I do this with my VBA
code?

Thanks
 




 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
tan12V112 Fri Dec 5 8:14:42 CST 2008.