Tom,
Thanks very much for that, worked a treat.
Steve
On Jan 24, 10:25 am, Tom Wickerath <AOS168b AT comcast DOT net> wrote:
> Hi Steve,
>
> Your table does not appear to be properly normalized. However, perhaps
> basing your SELECT statement on a Union query will work for you.
>
> qUNIFieldValues (saved query)
>
> SELECT Reference, Field1 AS [FieldValue] FROM TableName
> WHERE Field1 is not null
> UNION
> SELECT Reference, Field2 AS [FieldValue] FROM TableName
> WHERE Field2 is not null
> UNION
> SELECT Reference, Field3 AS [FieldValue] FROM TableName
> WHERE Field3 is not null
> ORDER BY [FieldValue]
>
> For your combo box:
>
> SELECT [FieldValue]
> FROM qUNIFieldValues
> WHERE Reference = 2;
>
> Tom Wickerath
> Microsoft Access MVP
>
> http://www.access.qbuilt.com/html/ex...ml/search.html
> __________________________________________
>
>
>
> "Renster" wrote:
> > Wayne,
>
> > I may have missed the point of what you wrote, but Im comfortable
> > writing queries like that. However, what I am trying to achieve is
> > different from the norm. Ordinarily a query such as the one you wrote
> > will return a recordset of "n" records from the one field
> > (TableName.FieldName). I wish to return a recordset made up of *1*
> > record from each of "n" fields.
>
> > eg:
>
> > (key)Reference Field1 Field2 Field3
> > --------------------------------------------------------------------
> > 1 ref1f1 ref1f2 ref1f3
> > 2 ref2f1 ref2f2 ref2f3
> > 3 ref3f1 ref3f2 ref3f3
>
> > I want to populate a combobox such that, if for example I pass "where
> > Reference = 2" as a filter, the combobox is filled:
>
> > ref2f1
> > ref2f2
> > ref2f3
>
> > Hope this makes my problem a little clearer
>
> > Steve- Hide quoted text -- Show quoted text -