G
Guest
I have gained invaluable information using this forum for the past couple of
years and I thank all who participate. I have been wrestling with this
problem for some time now and have finally decided the time has come to post
my question.
I have a good understanding of the different types of queries (ie: select,
append, union, make table etc). My database is using linked tables ( which
may be part of my problem - I am not sure). I am trying to merge two similar
tables on a field named [State Code]. In the Design View of the tables, all
components are set exactly the same. I am using Access 2002.
Here is a sample of my table data.
Table A Table B
State Code Amount State Code Amount
CA $50.00 MO
$10.00
LA $90.00 UT
$33.00
DE $25.00 CA
$40.00
This would be my desired recordset returned by a select query on which I
could base a form and/or report.
State Code Amount
CA $90.00
DE $25.00
LA $90.00
MO $10.00
UT $33.00
What the query does however is return a recordset like the following:
CA $50.00
DE $25.00
LA $90.00
CA $40.00
MO $10.00
UT $33.00
A union query is used to bring the two tables together. Then a select query
is used to "combine by state code" and view the results. What makes this
problem more perplexing is that what I really want to do is enter a Parameter
on the [State Code] field to view all of the "merged" table data. However,
when I place a parameter on this field, it will return only "some" of the
results. For instance, using the Parameter value "CA", the query returns
only the following Table B value:
CA $40.00
The $50.00 Table A value is not returned. I simply do not know what the
problem is. Any suggestions are appreciated. Thank you.
years and I thank all who participate. I have been wrestling with this
problem for some time now and have finally decided the time has come to post
my question.
I have a good understanding of the different types of queries (ie: select,
append, union, make table etc). My database is using linked tables ( which
may be part of my problem - I am not sure). I am trying to merge two similar
tables on a field named [State Code]. In the Design View of the tables, all
components are set exactly the same. I am using Access 2002.
Here is a sample of my table data.
Table A Table B
State Code Amount State Code Amount
CA $50.00 MO
$10.00
LA $90.00 UT
$33.00
DE $25.00 CA
$40.00
This would be my desired recordset returned by a select query on which I
could base a form and/or report.
State Code Amount
CA $90.00
DE $25.00
LA $90.00
MO $10.00
UT $33.00
What the query does however is return a recordset like the following:
CA $50.00
DE $25.00
LA $90.00
CA $40.00
MO $10.00
UT $33.00
A union query is used to bring the two tables together. Then a select query
is used to "combine by state code" and view the results. What makes this
problem more perplexing is that what I really want to do is enter a Parameter
on the [State Code] field to view all of the "merged" table data. However,
when I place a parameter on this field, it will return only "some" of the
results. For instance, using the Parameter value "CA", the query returns
only the following Table B value:
CA $40.00
The $50.00 Table A value is not returned. I simply do not know what the
problem is. Any suggestions are appreciated. Thank you.