That worked! Another quick question. How would I format say field a and b
to currency?
Thanks.
> Then you do want a union query.
>
[quoted text clipped - 35 lines]
> >>>
> >>> Thanks.
Sorting is done at the end of the union, using the field names in the first query.
SELECT A, B, C, D
FROM TableA
UNION ALL
SELECT A, C, Y, Z
FROM TableB
UNION ALL
SELECT A, x, y, z
FROM TableC
UNION ALL
SELECT A, B, C, D
FROM TableD
ORDER BY C, D
Formatting can get tricky. I would normally apply formatting using a control's
format property on a form or report. If you format in the Union query you
would have to use the format function AND that would change the value type
into a string for the column. So, if you formatted column A as currency using
the format function and attempted to sort by that column, you would get a text
sort (1,10,100,12,2,3,5) instead of a numeric sort (1,2,3,5,10, 12,100).
SELECT Format(TableA.A,"Currency") as A, b, c, d
FROM TableA
Union All ...
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
> That worked! Another quick question. How would I format say field a and b
> to currency?
[quoted text clipped - 40 lines]
>>>>>
>>>>> Thanks.
rml - 24 Apr 2008 01:18 GMT
Perfect! Thanks for your help.
> Sorting is done at the end of the union, using the field names in the first query.
>
[quoted text clipped - 71 lines]
> >>>>>
> >>>>> Thanks.