A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with Query



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 01:44 PM posted to microsoft.public.access
glenn
external usenet poster
 
Posts: 216
Default Help with Query

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
  #2  
Old March 17th, 2010, 04:09 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Help with Query

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.

"Glenn" wrote in message
...
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



  #3  
Old March 18th, 2010, 05:36 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Help with Query

On Wed, 17 Mar 2010 05:44:01 -0700, Glenn
wrote:

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.

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.