Convert table record to multiple rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Bad design, I know, but a customer wants to take what is currently field1,
field2, field3, etc. and use this data in a drop down box.

The table is a single record, with 10 of these fields.

Any suggestions on how to make each field a record in a query, and use it as
the data source for a combo box. (or other suggestions for using this data in
a combo box).

The data can be changed by the user, which is why I need to dynamically
access it.

Thanks!
 
Using the query grid, set the first field to the table's Primary key, and
use the following syntax in the next blank field.

NewField: Field1 & Field2 & Field3

Then on the combo's property sheet, set the column count = 2, bound column =
1, and column widths = 0"; 2"


Brian
 
Sounds like what you want is a union query.

SELECT a.id MyID, a.firstfield As Selection
From table As a
Union All
SELECT b.id, b.secondfield
from table As b
Union All
etc....

Brian
 
SELECT a.id As MyID, a.firstfield As Selection
From table As a
Union All
SELECT b.id, b.secondfield
from table As b
Union All
etc....
 
Brian,

That did the trick. THANK YOU.

Any way to do UNION queries in the Query window vs. SQL window?
--
David


Brian Bastl said:
SELECT a.id As MyID, a.firstfield As Selection
From table As a
Union All
SELECT b.id, b.secondfield
from table As b
Union All
etc....
 
Back
Top