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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Link a query result from form1 to form2



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2010, 08:18 PM posted to microsoft.public.access.gettingstarted
Craig
external usenet poster
 
Posts: 506
Default Link a query result from form1 to form2

I am currently trying to get to grips with Access 2003, and i seem to have a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one before
ie a list of results is displayed, the user then clicks an entry, and this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form [Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form, but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct
  #2  
Old March 15th, 2010, 09:01 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Link a query result from form1 to form2

Craig

What is the content(s) of[List7]? Is that a listbox? If so, which item is
seleted (or can multiple items be selected)? When you pass the value of
that listbox (?) to your query, what does Access tell you?

Is the form in which this control exists actually open when you try to run
the query?

Please post the SQL statement of the query.

More info, please...

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.

"Craig" wrote in message
...
I am currently trying to get to grips with Access 2003, and i seem to have
a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one
before
ie a list of results is displayed, the user then clicks an entry, and this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form [Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form,
but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct



  #3  
Old March 15th, 2010, 09:20 PM posted to microsoft.public.access.gettingstarted
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Link a query result from form1 to form2

Post the SQL of both queries by open in design view, clicking on VIEW - SQL
View, highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Craig" wrote:

I am currently trying to get to grips with Access 2003, and i seem to have a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one before
ie a list of results is displayed, the user then clicks an entry, and this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form [Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form, but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct

  #4  
Old March 15th, 2010, 09:29 PM posted to microsoft.public.access.gettingstarted
Craig
external usenet poster
 
Posts: 506
Default Link a query result from form1 to form2

As requested, here is the sql for the query that appears on Form1

SELECT LIVEDB_MBB010.PARTNO, LIVEDB_MBB010.DESCRIPTION2
FROM LIVEDB_MBB010
WHERE (((LIVEDB_MBB010.PARTNO) Like "FG*") AND
((LIVEDB_MBB010.DESCRIPTION2)=[Forms]![Form1]![List5]))
ORDER BY LIVEDB_MBB010.PARTNO;


And then, here is the sql for the query that is done for Form2

SELECT LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
FROM LIVEDB_MBI070 INNER JOIN (LIVEDB_MBB160 INNER JOIN LIVEDB_MBB680 ON
LIVEDB_MBB160.ACCOUNT15_SG = LIVEDB_MBB680.ACCOUNT15_PMR) ON
(LIVEDB_MBI070.ACCOUNT15_LAB = LIVEDB_MBB680.ACCOUNT15_PMR) AND
(LIVEDB_MBI070.SKILLGRADE = LIVEDB_MBB160.SKILLGRADE_SG)
GROUP BY LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
HAVING (((LIVEDB_MBB680.PROCNO_PMR)=[Forms]![Form1]![List7]));

Not sure if it helps at all, but Form1 also has the following VBA to help
populate the list boxes

List7.value = Null
List7.Requery





"KARL DEWEY" wrote:

Post the SQL of both queries by open in design view, clicking on VIEW - SQL
View, highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Craig" wrote:

I am currently trying to get to grips with Access 2003, and i seem to have a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one before
ie a list of results is displayed, the user then clicks an entry, and this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form [Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form, but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct

  #5  
Old March 15th, 2010, 10:34 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Link a query result from form1 to form2

For what it's worth, forms don't hold data in Access. That what tables do.
So your queries (SQL) really need to be against underlying tables, although
using a form for selection criteria is fine.

I couldn't help but notice that you have a lot of what appear to be tables
and fields with very similar names. This may be what is called "repeating
fields", a prime example of which would be fields named [January],
[February], [March], etc.

While this approach (essentially identical table structures for multiple
tables, all holding the same kind of information) is quite common ... in
spreadsheets ... it will put a serious crimp in your use of Access. Access
is optimized for well-normalized relational data, not 'sheet data.

If you'll post back a description of your underlying table structure, folks
here may be able to offer ideas on ways to get more out of Access ...

Good luck!

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.

"Craig" wrote in message
...
As requested, here is the sql for the query that appears on Form1

SELECT LIVEDB_MBB010.PARTNO, LIVEDB_MBB010.DESCRIPTION2
FROM LIVEDB_MBB010
WHERE (((LIVEDB_MBB010.PARTNO) Like "FG*") AND
((LIVEDB_MBB010.DESCRIPTION2)=[Forms]![Form1]![List5]))
ORDER BY LIVEDB_MBB010.PARTNO;


And then, here is the sql for the query that is done for Form2

SELECT LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
FROM LIVEDB_MBI070 INNER JOIN (LIVEDB_MBB160 INNER JOIN LIVEDB_MBB680 ON
LIVEDB_MBB160.ACCOUNT15_SG = LIVEDB_MBB680.ACCOUNT15_PMR) ON
(LIVEDB_MBI070.ACCOUNT15_LAB = LIVEDB_MBB680.ACCOUNT15_PMR) AND
(LIVEDB_MBI070.SKILLGRADE = LIVEDB_MBB160.SKILLGRADE_SG)
GROUP BY LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
HAVING (((LIVEDB_MBB680.PROCNO_PMR)=[Forms]![Form1]![List7]));

Not sure if it helps at all, but Form1 also has the following VBA to help
populate the list boxes

List7.value = Null
List7.Requery





"KARL DEWEY" wrote:

Post the SQL of both queries by open in design view, clicking on VIEW -
SQL
View, highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Craig" wrote:

I am currently trying to get to grips with Access 2003, and i seem to
have a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one
before
ie a list of results is displayed, the user then clicks an entry, and
this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form
[Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form,
but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct



  #6  
Old March 16th, 2010, 12:26 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Link a query result from form1 to form2

First does Partno in LivedB_MBB010 have the same values in it that you have in
LIVEDB_MBB680.PROCNO_PMR. In other words are the two the same type of thing?

By the way there is no reason to use a totals (group by query) for form2. You
might want to use DISTINCT keyword if you are trying to remove duplicates. An
aggregate query normally makes sense only if you are doing something besides
grouping the fields (max, min, avg, first, last, etc.)

SELECT DISTINCT LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
FROM LIVEDB_MBI070 INNER JOIN (LIVEDB_MBB160 INNER JOIN LIVEDB_MBB680
ON LIVEDB_MBB160.ACCOUNT15_SG = LIVEDB_MBB680.ACCOUNT15_PMR)
ON (LIVEDB_MBI070.ACCOUNT15_LAB = LIVEDB_MBB680.ACCOUNT15_PMR) AND
(LIVEDB_MBI070.SKILLGRADE = LIVEDB_MBB160.SKILLGRADE_SG)

WHERE LIVEDB_MBB680.PROCNO_PMR=[Forms]![Form1]![List7]


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Craig wrote:
As requested, here is the sql for the query that appears on Form1

SELECT LIVEDB_MBB010.PARTNO, LIVEDB_MBB010.DESCRIPTION2
FROM LIVEDB_MBB010
WHERE (((LIVEDB_MBB010.PARTNO) Like "FG*") AND
((LIVEDB_MBB010.DESCRIPTION2)=[Forms]![Form1]![List5]))
ORDER BY LIVEDB_MBB010.PARTNO;


And then, here is the sql for the query that is done for Form2

SELECT LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
FROM LIVEDB_MBI070 INNER JOIN (LIVEDB_MBB160 INNER JOIN LIVEDB_MBB680 ON
LIVEDB_MBB160.ACCOUNT15_SG = LIVEDB_MBB680.ACCOUNT15_PMR) ON
(LIVEDB_MBI070.ACCOUNT15_LAB = LIVEDB_MBB680.ACCOUNT15_PMR) AND
(LIVEDB_MBI070.SKILLGRADE = LIVEDB_MBB160.SKILLGRADE_SG)
GROUP BY LIVEDB_MBB680.SKILLGRADE_PMR01, LIVEDB_MBB680.ACCOUNT15_PMR,
LIVEDB_MBB680.PROCNO_PMR, LIVEDB_MBB680.PROCVER_PMR,
LIVEDB_MBB680.PARTNO_PMR, LIVEDB_MBB680.PROCSTAGE_PMR,
LIVEDB_MBB680.RESOURCENO_PMR, LIVEDB_MBB680.SKILLGRADE_PMR02,
LIVEDB_MBB680.SKILLGRADE_PMR03, LIVEDB_MBB680.SKILLGRADE_PMR04,
LIVEDB_MBB680.SKILLGRADE_PMR05, LIVEDB_MBB680.SKILLGRADE_PMR06,
LIVEDB_MBB680.SKILLGRADE_PMR07, LIVEDB_MBB680.SKILLGRADE_PMR08,
LIVEDB_MBB680.SKILLGRADE_PMR09, LIVEDB_MBB680.SKILLGRADE_PMR10,
LIVEDB_MBB680.RSMANUSAGE_PMR01, LIVEDB_MBB680.RSMANUSAGE_PMR02,
LIVEDB_MBB680.RSMANUSAGE_PMR03, LIVEDB_MBB680.RSMANUSAGE_PMR04,
LIVEDB_MBB680.RSMANUSAGE_PMR05, LIVEDB_MBB680.RSMANUSAGE_PMR06,
LIVEDB_MBB680.RSMANUSAGE_PMR07, LIVEDB_MBB680.RSMANUSAGE_PMR08,
LIVEDB_MBB680.RSMANUSAGE_PMR09, LIVEDB_MBB680.RSMANUSAGE_PMR10,
LIVEDB_MBB680.RSMANLEVEL_PMR01, LIVEDB_MBB680.RSMANLEVEL_PMR02,
LIVEDB_MBB680.RSMANLEVEL_PMR03, LIVEDB_MBB680.RSMANLEVEL_PMR04,
LIVEDB_MBB680.RSMANLEVEL_PMR05, LIVEDB_MBB680.RSMANLEVEL_PMR06,
LIVEDB_MBB680.RSMANLEVEL_PMR07, LIVEDB_MBB680.RSMANLEVEL_PMR08,
LIVEDB_MBB680.RSMANLEVEL_PMR09, LIVEDB_MBB680.RSMANLEVEL_PMR10
HAVING (((LIVEDB_MBB680.PROCNO_PMR)=[Forms]![Form1]![List7]));

Not sure if it helps at all, but Form1 also has the following VBA to help
populate the list boxes

List7.value = Null
List7.Requery





"KARL DEWEY" wrote:

Post the SQL of both queries by open in design view, clicking on VIEW - SQL
View, highlight all, copy, and paste in a post.

--
Build a little, test a little.


"Craig" wrote:

I am currently trying to get to grips with Access 2003, and i seem to have a
handle on some of the basics.

I have managed to write a couple of queries, which feed from the one before
ie a list of results is displayed, the user then clicks an entry, and this
then goes into a second query to populate a second list box.

The thing i am trying to do is now have a query on a second form [Form2]
reference a click from [Form1]

I thought the criteria would read as this

[Forms]![Form1]![List7][List7] being the field on the first form, but
it does not seem to be the case.

Hopefully it is a naming convention i am failing to get correct

 




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 08:42 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.