New to this

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

Guest

Ok, so I have been in my current position for less than 6 months. I came in
not kn owing anything about Access. Now I have the job of updating a database
in Access to allow only the supervisors to view specified reports, and to add
users to be able to view these reports as well. I have created a form for
this, and on this form have a listbox(I think) were they can scroll through
and find the users last name that they want which is from one table. There is
a check box that asks if the user is an auditor. What I am wanting to have
happen is if the checkbox = true to loop through a second second table
"tblAuditors" until the last names are equal, and then populate a second
textbox with the user id. But if the checkbox = false then to allow the
"manager" to input a the user id into the textbox, and for it to update
"tblAuditors", and "tblManagers".
Can someone help me with this. I have been working on it for 2 weeks, and
have gotten no where.

Thanks.
 
Ok, so I have been in my current position for less than 6 months. I came in
not kn owing anything about Access. Now I have the job of updating a database
in Access to allow only the supervisors to view specified reports, and to add
users to be able to view these reports as well. I have created a form for
this, and on this form have a listbox(I think) were they can scroll through
and find the users last name that they want which is from one table. There is
a check box that asks if the user is an auditor. What I am wanting to have
happen is if the checkbox = true to loop through a second second table
"tblAuditors" until the last names are equal, and then populate a second
textbox with the user id. But if the checkbox = false then to allow the
"manager" to input a the user id into the textbox, and for it to update
"tblAuditors", and "tblManagers".
Can someone help me with this. I have been working on it for 2 weeks, and
have gotten no where.

Thanks.

You're missing the point of how relational databases work.

No "looping" is necessary.
In fact no code is necessary!
In addition, you don't need separate tblAuditors or tblManagers at all!

Instead, you need a very simple query based on your employee table, with a
criterion of True on the Auditor field to display only those records which are
auditors; or a criterion of False to select those that aren't. The manager can
simply check the checkbox on the Form based on this query to make someone an
auditor.

You may need to implement Access Security if you want only managers to be able
to do this... but again, no looping and no code are needed.

John W. Vinson [MVP]
 
Back
Top