Access Data Page filter option

J

Jason Lopez

I have a basic Access Data Page designed where all pertinent information is
displayed for the overall. However, based on the person who is reviewing
the information, how do I filter out the irrelevant information from the
page without creating a seperate query for every single person?
Essentially, I am thinking of some type of dialogue box that will display
before displaying the page of information. That dialogue box will ask for
the userid of the person seeking the information and then match that up with
the relevant information. Then only the information attached to the userid
is displayed.

Is there a way to do that in an Access Data Page?

Jason Lopez
 
T

Tony Vrolyk

First off is the UserId the same as their login username? If so you could
use the function here to retreive their login ID.
http://www.mvps.org/access/api/api0008.htm

Then based on that you could have the code fill the form with what you want.

Lets say your basic query is something like
SELECT * FROM Table ORDER BY DateField

then on open of the form you could do something like

Dim strSql as string
strSql = "SELECT * FROM Table WHERE UserID='" & fOSUserName & "' ORDER BY
DateField
Me.Form.Recordsouce = strSql

If the fOSUserName doesn't return the right UserID then you could use an
input box or something but hopefully you get the idea.

Tony
 
A

Aquitane

Hi Guys,

I need to know where i can go to find freight forwarders/logistics
manager/shipping company newsgroups.

Can any one help,please?i`d truly appreciate it.

Kind regards
 
D

Douglas J. Steele

You definitely won't find them here in the Microsoft hierarchy of
newsgroups.

You're also far less likely to get your questions asked if you tack them
onto someone else's post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top