Filtering in form

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

Guest

I have table with 80 employees all with different locations. I would like to
apply a filter when my form is opened by a user to ask "Which location would
you like to see?" and for the user to only have access to those records. I
developed a query that asks the questions and tried to use it as a subform
but I'm doing something wrong. I being prompted with the question but it's
not filtering by city. Can someone help me?

Thanks.
 
Yes, but you have to move your left shoulder so I can see the screen that has
your query SQL used as source for the form.

Or you can post the SQL by opening the query in design view, click on menu
VIEW - SQL View, highlight all, copy and paste in a post.
 
Sorry.
SELECT TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
FROM TRADERS
GROUP BY TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]));
 
I being prompted with the question but it's not filtering by city.
Your parameter --
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]))
says it wants a location but the examples seem to be
exchanges. Seems like you are prompting for one thing but the location field
may have different data.

Are you entering a single letter at the prompt or something else.

What do you have stored in the Location field?

Post some sample data.
--
KARL DEWEY
Build a little - Test a little


TraderAnalysis said:
Sorry.
SELECT TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
FROM TRADERS
GROUP BY TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]));

KARL DEWEY said:
Yes, but you have to move your left shoulder so I can see the screen that has
your query SQL used as source for the form.

Or you can post the SQL by opening the query in design view, click on menu
VIEW - SQL View, highlight all, copy and paste in a post.
 
No, I only enter in the letter as prompted in my text. The location field is
only by those letters as prompted. No cities are in my database. The query
works but I can't get it to work in my form. Could I be doing something
wroing when I bring it into my form as a subform? I'm still a bit confused
with the whole subforms. Thanks for your help.

KARL DEWEY said:
Your parameter --
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]))
says it wants a location but the examples seem to be
exchanges. Seems like you are prompting for one thing but the location field
may have different data.

Are you entering a single letter at the prompt or something else.

What do you have stored in the Location field?

Post some sample data.
--
KARL DEWEY
Build a little - Test a little


TraderAnalysis said:
Sorry.
SELECT TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
FROM TRADERS
GROUP BY TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]));

KARL DEWEY said:
Yes, but you have to move your left shoulder so I can see the screen that has
your query SQL used as source for the form.

Or you can post the SQL by opening the query in design view, click on menu
VIEW - SQL View, highlight all, copy and paste in a post.
--
KARL DEWEY
Build a little - Test a little


:

I have table with 80 employees all with different locations. I would like to
apply a filter when my form is opened by a user to ask "Which location would
you like to see?" and for the user to only have access to those records. I
developed a query that asks the questions and tried to use it as a subform
but I'm doing something wrong. I being prompted with the question but it's
not filtering by city. Can someone help me?

Thanks.
 
Sorry, but you will have to tell more of the story.

What field are you using in the Master/Child links between the main and
subform?


--
KARL DEWEY
Build a little - Test a little


TraderAnalysis said:
No, I only enter in the letter as prompted in my text. The location field is
only by those letters as prompted. No cities are in my database. The query
works but I can't get it to work in my form. Could I be doing something
wroing when I bring it into my form as a subform? I'm still a bit confused
with the whole subforms. Thanks for your help.

KARL DEWEY said:
I being prompted with the question but it's not filtering by city.
Your parameter --
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]))
says it wants a location but the examples seem to be
exchanges. Seems like you are prompting for one thing but the location field
may have different data.

Are you entering a single letter at the prompt or something else.

What do you have stored in the Location field?

Post some sample data.
--
KARL DEWEY
Build a little - Test a little


TraderAnalysis said:
Sorry.
SELECT TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
FROM TRADERS
GROUP BY TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]));

:

Yes, but you have to move your left shoulder so I can see the screen that has
your query SQL used as source for the form.

Or you can post the SQL by opening the query in design view, click on menu
VIEW - SQL View, highlight all, copy and paste in a post.
--
KARL DEWEY
Build a little - Test a little


:

I have table with 80 employees all with different locations. I would like to
apply a filter when my form is opened by a user to ask "Which location would
you like to see?" and for the user to only have access to those records. I
developed a query that asks the questions and tried to use it as a subform
but I'm doing something wrong. I being prompted with the question but it's
not filtering by city. Can someone help me?

Thanks.
 
In my main table, I have location, trader name, acro, net pnl and projected
net pnl all of which I brought into the main form. In the query, I have
location, trader name and acro and I then I have under criteria for location
[Please select the physical location of your office: A = AMEX; C=CBOE;
P=ARCA; X=PHLX]. I then brought in the subform with connecting by location.
When opening my Filter subform (not in main table), it works correctly but
when I try to bring it into main form, it does not work.

Also, another quick question is that in another form, I would like to set a
tabular form with a footer that addes up the projected salary but it seems
that when I bring in the subform, I lose the tabular setting. I only have
one line item per employee so I don't have to have a seperate record (or
page) for each. How can I get the footer to bring in my calcuations from my
subform with still having a tabular setting?

I really appreciate your help. None of my Access books address these
questions.
Thanks again.

KARL DEWEY said:
Sorry, but you will have to tell more of the story.

What field are you using in the Master/Child links between the main and
subform?


--
KARL DEWEY
Build a little - Test a little


TraderAnalysis said:
No, I only enter in the letter as prompted in my text. The location field is
only by those letters as prompted. No cities are in my database. The query
works but I can't get it to work in my form. Could I be doing something
wroing when I bring it into my form as a subform? I'm still a bit confused
with the whole subforms. Thanks for your help.

KARL DEWEY said:
I being prompted with the question but it's not filtering by city.
Your parameter --
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]))
says it wants a location but the examples seem to be
exchanges. Seems like you are prompting for one thing but the location field
may have different data.

Are you entering a single letter at the prompt or something else.

What do you have stored in the Location field?

Post some sample data.
--
KARL DEWEY
Build a little - Test a little


:

Sorry.
SELECT TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
FROM TRADERS
GROUP BY TRADERS.LOCATION, TRADERS.[TRADER NAME], TRADERS.ACRONYM
HAVING (((TRADERS.LOCATION)=[Please select the physical location of your
office: A = AMEX; C=CBOE; P=ARCA; X=PHLX]));

:

Yes, but you have to move your left shoulder so I can see the screen that has
your query SQL used as source for the form.

Or you can post the SQL by opening the query in design view, click on menu
VIEW - SQL View, highlight all, copy and paste in a post.
--
KARL DEWEY
Build a little - Test a little


:

I have table with 80 employees all with different locations. I would like to
apply a filter when my form is opened by a user to ask "Which location would
you like to see?" and for the user to only have access to those records. I
developed a query that asks the questions and tried to use it as a subform
but I'm doing something wrong. I being prompted with the question but it's
not filtering by city. Can someone help me?

Thanks.
 
Back
Top