By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

Combo box and option group for filtering records for table input

P: n/a
I have an ordering form that use two combo boxes to filter down the
records of a Products table. This worked fine with the after_Update of
the first filtering the records and creating the rowsource of the
second combo. The second combo's control source is the Product ID field
(foriegn key) on the Orders table.

Everything worked well until I decided to enhance the form by changing
the second combo to an option group. Now I don't know how to use both
of the controls to filter down the Products table records to get the
appropriate record (ID field - Primary key) and insert it into the
Product ID field (foreign key) of the Orders table.

I have created a properly working SQL INSERT INTO / SELECT statement
that gets the right data but can't get it to insert it into the table.

As an alternative I created a select query that works properly but
don't know how to get the output of the query into the table. I guess
it's a similar problem.

Any help would be appreciated.

May 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
There's no very convenient way to use an option group to represent a
variable list of items, such as a list of Products. The value for each
option button must be either set manually (a true grind and impractical if
the list could EVER change) or in code (requiring some naming rules or very
tidy tag use and still impractical if the list could EVER change).

If you want to see all the products at once, use a ListBox insteadof a
ComboBox. Then you still get your live list of products, but you can select
just like an option group, just by clicking on the desired value. The
ListBox, of course, differs from the ComboBox primarily in the display (list
for listbox versus single textbox for combobox until opened). So, your
listbox can still be bound to the ProductID field and the whole app works
almost identically to the way it did before. In fact, the only likely
change is that you might name the listbox differently form the combobox.
Otherwise, no difference.
May 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.