I'm stumped. If you like, make a copy of your database; remove
everything except the form and module. Also, in this copy, grant
permissions to the Users group for everything, zip it up and email
it to me and I'll have a look.
--
Joan Wild
Microsoft Access MVP
Lori wrote:
Okay, I removed the ActiveX byt it didn't help. I'm still getting
the same error.
--
Lori A. Pong
:
Try removing the reference to ActiveX Data Objects - I'll bet you
aren't using ADO anyway.
Once you uncheck it, use Debug, Compile and see if it finds any
errors.
--
Joan Wild
Microsoft Access MVP
Lori wrote:
The first five references are checked: Visual Basic for
Applications, Microsoft Access 11.0 Object Library, OLE
Automation, Microsoft DAO
3.6 Object Library and Microsoft ActiveX Data Objects 2.5 Library.
--
Lori A. Pong
:
I know, but if [Event Procedure] is missing from the property
then the code won't fire. Also you didn't respond wrt the
references.
--
Joan Wild
Microsoft Access MVP
Lori wrote:
Yes, the on click runs the code for the admin to change a user's
password --
Lori A. Pong
:
Hit Ctrl-G; go to Tools, References - what references are
checked? Are there any marked as missing?
Wait a minute; just thought of something else. In the
properties dialog when the form is in design view and you have
the cmdPasswordAdmin control selected, is [Event Procedure] in
the On Click property?
--
Joan Wild
Microsoft Access MVP
Lori wrote:
The form is my unbound menu. I have two buttons on the form
one for the user's to change their own passwords and one
that's been set up for one of the administrators to handle
passwords (this is the one I'm trying to hide from everyone
but the admins) so there are no relationships setup with this
form. I am using Office 2003. Is there any editing in the
code from the security FAQ that I might need to edit to point
to the right place? --
Lori A. Pong
:
I shouldn't make a difference. Check your references in the
Tools menu. Any missing? What is checked? Have you save the
form? What version of Access?
--
Joan Wild
Microsoft Access MVP
Lori wrote:
I get a totally different error "method or datamember not
found". This should be easy, would it make a difference if I
did it backwards? Tell it to hid unless a member of the
Admins group is logged in? --
Lori A. Pong
:
try Me.cmdPasswordAdmin.visible = True
--
Joan Wild
Microsoft Access MVP
Lori wrote:
Joan, I've followed all the steps, created the module with
the information from the security FAQ, and used the code
as follows:
Private Sub Form_Open(Cancel As Integer)
If faq_IsUserInGroup("Admins", CurrentUser()) = True Then
Me!cmdPasswordAdmin.Visible = True
End If
In order to make sure there is no doubt to the control
name and the caption are the same and I cut and pasted
the name to avoid typos, however everytime I try to view
my form I get an error message that the "database can't
find the field "cmdPasswordAdmin" referred to in your
expression"
What am I doing wrong?
--
Lori A. Pong
:
I take it you are using the 'switchboard manager' in
Access to set up your menu form.
I suggest you ditch it and instead just create an unbound
form. You can add all the buttons you like, and you'll
have more flexibility than the SM can provide.
There is code in the security FAQ
http://support.microsoft.com/?id=207793 you can use to
determine if a user is a member of a group. In the open
event for your form, use the function and hide various
buttons that the group isn't supposed to see. For
example
If faq_IsUserInGroup("EnterData",CurrentUser) then
Me.cmdWhatever.Visible = False
Me.cmdSomething.Visible = False
Else
Me.cmdWhatever.Visible = True
Me.cmdSomething.Visible = True
End If
--
Joan Wild
Microsoft Access MVP
Kit wrote:
I was wondering how do i assign certain previledges to
certain users. For example on my switchboard it has
links to all my forms some which are manager forms and
the otehrs which can be used by all staff. I have run
the user level secuirty wizard and assigned certain
previledges such as read only for new users, and full
permissions and full data users. But i want to know how
can i stop certain groups opening certain links from my
switchboard such as manager options??? I am a little
confused on this topic.
all ur help would be great