Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box rowsource in a CONTINUOUS form

Status
Not open for further replies.

jflachman

Technical User
May 30, 2001
133
US
I posted this yesterday and PHV tried to help but was unable. Still looking for an answer. any help is appreciated.

I have 2 tables:

Tests
-TestID (Autonumber)
-TestDesc (Text)

TestInput
- TestInputID
- TestID
- InputDesc

Now, in my CONTINUOUS form I have 2 combo boxes:
The first one uses the tables TESTS as the rowsource.

In the second one I want to display only the TestInput values that are valid for that TestID.

I have tried the following:
- In the AfterUpdate event for the TESTS combo, I reset the rowsource for the TestInput combo.

What happens is that this updates the RowSource for that field in every record in the form. Since different records have different TESTS combo values, in NON-CURRENT records, the TestInput combo goes blank when the TestInput ID is not valid for the CURRENT record TestID.

Here is an example:

Valid inputs for TEST1 are INPUT1 and INPUT2
Valid inputs for TEST2 are INPUT3 and INPUT4

When I select TEST1 in the TESTS combo, I want INPUT1 and INPUT2 to be the choices in the TestInput Combo. However, in the previous record, where TEST2 was the choice in the TESTS combo, I still want to see that the user selected INPUT3.

If I update the rowsource in the current record to include only INPUT1 and INPUT2, then any previous records where INPUT3 or INPUT4 were selected go blank because they are not in the rowsource.


Does that help you understand my challenge?


Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Perhaps it would be better to focus on one thing at a time during run-time. My impression from your post is that you are trying to see everything on the continuous form. My experience w/ continuous' is to show static data from a table in continuous format, along with checkboxes in each record possibly. Consider the following: Form (single) contains combobox and user selects a test. Based on selection, the other combo or listbox shows Inputs to that test. Then user can go further by selecting an Input for review, or whatever.
You've probably considered this - then this would be my thinking as well. (We haven't used any pulp for this message ...).
Hope this helps. Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top