Re: Multiple table select query remove duplicates



Steve,

Thanks for the reply.

As the results are to be displayed on a form I'll use a listbox and populate
it using VBA code. That way I'll have better control on what is displayed.

Regards

Steve Perrins

"[MVP] S.Clark" <steve.clark_NOSPAM@xxxxxxxxxx> wrote in message
news:%23TuPZgxaGHA.1352@xxxxxxxxxxxxxxxxxxxxxxx
You can use the HideDuplicates property in a report. But nothing in a
query.


--
Steve Clark, Access MVP
FMS, Inc
http://www.fmsinc.com/consulting
Professional Access Database Repair
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

"Steve Perrins" <support@xxxxxxxxxxxxxxxxxxx> wrote in message
news:%23MaaKZuaGHA.3376@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have two tables exp_recs and inc_recs both with the following fields :-
ID - Primary key
ac_gross
ac_date
ac_PROJID

exp_recs has the following records
1 50.20
2 64.67
3 99.33

inc_recs has the following records
1 60.50
2 99.00
I run the following query:-

SELECT exp_recs.ac_gross AS exp_gross, inc_recs.ac_gross AS inc_gross
FROM exp_recs, inc_recs

And the following is produced
ac_gross inc_gross
50.20 60.50
50.20 99.00
64.67 60.50
64.67 99.00
99.33 60.50
99.33 99.00

How would I code my query to produce the following
ac_date ac_gross inc_gross
01/01/2006 50.20
02/01/2006 60.50
08/01/2006 64.67
10/01/2006 99.00
20/01/2006 99.33


Thanks in advance

Steve.





.



Relevant Pages

  • Re: Running Access queries with VBA variables
    ... variable to be used in the sql code. ... > you can do this depending on where you are going to use the query. ... > Or, you can do it like this with a control on a form, but not with a memory ... >> When I try running it with the VBA code instead using ...
    (microsoft.public.access.formscoding)
  • Re: Select a Value (text format) from a combo box in an update query
    ... combo box control, have VBA code that start the query, with DoCmd (or that ... the query AFTER having displayed the combo box, ...
    (microsoft.public.access.queries)
  • Re: trying to query an open/current record in order to email that reco
    ... >> The idea is to run the query, then email the report that uses the query results. ... When I hit the control box in the form, I get the query data sheet view, ... in the VBA code before you run the query. ...
    (microsoft.public.access.queries)
  • Query converted to VBA code
    ... Any way to convert a query to vba code, run the query and put the result ... into a variable or a control? ... only has one calculated field. ...
    (microsoft.public.access.queries)
  • query returning oldest record only
    ... This is the query as run in Access which returns bad results. ... I also get proper results when I use ADO. ... Working continous form VBA code. ...
    (microsoft.public.access.queries)