Union query

G

Guest

I have 2 select queries, each based on 3 tables and each using the Totals
function.
I then have a union query based on these 2 queries which is fine other than
combo box fields revert back to their stored ID number rather than displaying
the meaningful text which is in column 1 (ie Client name). I tried changing
the union query to FieldName.Column(1) but that didn't work. My other thought
is to create another query based on the union query to introduce the
necessary tables and actual field names but I am trying to keep the numbers
of queries etc to a minimum to help with maintenance.
I am using Access 2003 and any help would be much appreciated.
 
J

John Spencer

It sounds as if what you need is to change the properties of the combobox.

You can hide the first column of the combobox by setting the combobox's
column width to 0. That will set the first column's width to 0 -
effectively making it invisible. The control will still be bound to the
first column.

Another way to get a similar result is to change the column order in the
union query, so the first column contains the data you want always displayed
and change the combobox's bound column property to 2 or whichever column of
the query contains the proper value.
 
G

Guest

Hi John, thanks for the response. I actually think I've figured it out now
by including the necessary source tables in the original queries and adding
the fields direct from them. The trick then is getting the joins right so
that you end up with the right results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top