Select query in Combo Box

Z

zachnjoe

I have a combo box with a pull down list of WPS, CE Number, PEN_MIN and
PEN_MAX pulling data from [WPS Data]. The pull down list works good but I
only want store WPS in my other table. All items from my pull down list are
being stored under WPS in my other table.

SELECT [WPS Data].WPS & " | " & [WPS Data].[CE NUMBER] & " | " & [WPS
Data].PEN_MIN & " | " & [WPS Data].PEN_MAX
FROM [WPS Data]
ORDER BY [WPS Data].WPS, [WPS Data].PEN_MIN, [WPS Data].PEN_MAX, [WPS
Data].[CE NUMBER];
 
J

John Spencer

You need to change your query slightly and your combobox slightly.
Add WPS by itself to to the query for the combobox.

SELECT WPS, [WPS Data].WPS & " | " & [WPS Data].[CE NUMBER] & " | "
& [WPS Data].PEN_MIN & " | " & [WPS Data].PEN_MAX
FROM [WPS Data]
ORDER BY [WPS Data].WPS, [WPS Data].PEN_MIN,
[WPS Data].PEN_MAX, [WPS Data].[CE NUMBER];

Change your combobox properties on the format tab to:
Column Count: 2
Column Width: 0

That hides the first column (WPS by itself), but will store that value in
your other table.
 

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

Similar Threads


Top