Convert table record to multiple rows

D

David

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!
 
B

Brian Bastl

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
 
B

Brian Bastl

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
 
B

Brian Bastl

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....
 
D

David

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....
 
B

Brian Bastl

David,

no, only works in SQL view.

Brian


David said:
Brian,

That did the trick. THANK YOU.

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

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