472,804 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,804 software developers and data experts.

Combo box and option group for filtering records for table input

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
1 3791
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alex | last post by:
Acc97. I have a form which within a subform records machine down time. I have a total of 8 machines. (1-2-3 ect.) What I have been doing is using a combo box linked to the record table to...
2
by: Steve | last post by:
Access 97. I have a form where there is an option group with two buttons, and a combo box. The combo box Row Source is a query. The option group has two options a) include a subset of the...
3
by: Cagey | last post by:
What I'm trying for: If this selection or if click on selection (highlighted line choice/ which ever selection change) w/in query's combo dropdown list box (on Switchboard), then Open in...
8
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the...
1
by: The Eclectic Electric | last post by:
I'd be very grateful if anyone could help me with this. From my limited knowledge of Javascript I don't think it is possible, but I'll punt anyway. I downloaded and very slightly adapted this...
1
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is...
1
by: ecce66 | last post by:
i'm trying to make a very simple combo box which will act as a shopping cart for my website where i will be selling some art prints; ideally once a visitor selects a print title in the combo box,...
4
by: novoselent | last post by:
This seems like it should be an easy thing, but I think I'm missing something simple here...or I'm just going about it all wrong... Using Access 2003 I have a form that lists vehicle service...
3
by: alandiit | last post by:
Hi every body I would like connect three combo box (CascadingDropDown with a Database) MYSQL by asp classic or Java Script . But I have a problem with this example , when I will change City ,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.