Help with Query

G

Glenn

I have a query which I need a bit of help with.

I have written the query as follows:-

Coloumn 1
Field: Expr1:[forms]![Select Agent]![Select Agent]
Total: Group By

Coloumn 2
Field: CL Code
Table: Contracts Entered Data
Total: Group By

The macro look at a form Select Agent and takes the name choosen from a drop
down menu (CL Code) on that form. I want the next stage of the macro to only
select records where the CL Code is the same as what was choosen in stage 1

Thanks
 
J

Jeff Boyce

Glenn

Please post the SQL statement for your query.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John W. Vinson

I have a query which I need a bit of help with.

I have written the query as follows:-

Coloumn 1
Field: Expr1:[forms]![Select Agent]![Select Agent]
Total: Group By

Coloumn 2
Field: CL Code
Table: Contracts Entered Data
Total: Group By

The macro look at a form Select Agent and takes the name choosen from a drop
down menu (CL Code) on that form. I want the next stage of the macro to only
select records where the CL Code is the same as what was choosen in stage 1

Thanks

I'm sorry, but this query makes no sort of sense.

You're telling Access to group by a value *which isn't even in the table* - a
value entered on a form.

I'm *guessing* (knowing absolutely nothing about either your table or what
you're trying to do) that the Forms![Select Agent]![Select Agent] should be on
the criteria line under the Agent field, rather than in the Fields row of the
grid... but a clearer explanation of your table structure and goal would
certainly help.

Note also that what you are posting is NOT a Macro but a Query. Different
beast entirely.
 

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

Similar Threads

Problem with Combo box on form 1
Query 1
sum a count column in query 2
Total volume 4
totals for multiple fields 1
help with query for report 1
Access Query problem 1
Running Total in Access 2002 2

Top