Form/SubForm Interaction

jwillet1

Registered User.
Local time
Today, 13:59
Joined
Nov 8, 2013
Messages
35
I have two tables that store information input into a mainform/subform. The two tables have a similar relationship to an orders/order details type system. The mainform records data in to the test table and the subfrom records it into the testdetails table. The testdetails table stores the testID (the PK for the main testtable), any test metric ID's used, and a PK for the testdetails table.

Now the testing being done involves many metrics, sometimes these metrics are run more than one at a time, in common testgroups. Therefore on the mainform I have an unbound combobox linked to the different common test groups. This combobox, through an afterupdate event, sets the recordsource of a combobox in the subform, to limit the selection to those in the chosen test group, the subform is in datasheet view. As it is now, the user has to has to select each metric in the test group and create a new record for it in the subform. Im looking for a way to automatically do that, some groups have up to 8-10 metrics. The attached picture shows the setup of the mainform and subform.
 

Attachments

  • SubformQuestion.png
    SubformQuestion.png
    24.2 KB · Views: 89
I'm afraid I don't understand your issue.

From what I see in the pic I understand that:
1) The user select something in the ASR Test Bin
2) Based on this selection, the combo(s) in the subform ASR Line Item is (are) filtered
3) The user should select each item from this combo(s) in order to fill the subform (I suspect that duplicates are not allowed).

Is this the reality ?!?!?!
 
Close.

That is what it currently does, however as it stands now the user has to click each individual test in the testbin subform, to input the data for each of those individually in tblTestDetails. As long as they select a testbin, all of the tests in that bin will be run. Therefore there is no point in individually selecting the tests from the combobox that is shown in the picture.

What I want, is when the user selects the testbin the selecting of each test is automatically done, essentially the subform autofills what the user would have selected, creating the new records in tblTestDetails automatically.

The reason I want to do this is to make it easier on the user to input the data and so that user don't accidentally select the same one twice or doesn't select all of the tests in the testbin.
 
Take a look to the attached DB.
Hit the "Comenzi" (=Orders) button in the first form that appear.
This will open other form where will see a subform that seems to be exactly what you are looking for.

Unfortunately is in Romanian language, but hope you will be able to understand the idea by looking to the Record Source property.
 

Attachments

Users who are viewing this thread

Back
Top Bottom