Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create an unbound form that uses a different query depending 1

Status
Not open for further replies.

jsanbor1

MIS
Apr 30, 2003
38
US
on the current user.

I am using Access 2000 with the built in security.

We need to control what contact each user is allowed to see and this seems like it might be a good way to do it. That way we can modify the users query as needed if he needs to see more or less contacts.

If current user = jack smith, then use qryJackSmith to open the form. (I would love to put in a piece of code that I've started with here, but I don't know where to start.)

I am new to using unbound forms, but I'm hoping that this is a simple problem, even though it was been giving me such a headache.

 
the relevant bit of code is:

Form!FornName!ControlSource = 'qryName/tableName'

--------------------
Procrastinate Now!
 
set the recordsource during the Form's On Load Event

Me.RecordSource = "qry" & Environ("username")



PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top