CodePudding user response:
Your goods should have three levels: category, name, model, can be built three associated table,Category table field name: category ID, category
The name table field name: ID, name, category ID (associated with categories table category ID)
Model table field name: model ID, type, name, ID (associated with the name of the table the name ID)
Form, the category of the combo box properties: data - line source: category table, binding columns: 1, format, the number of columns: 2, column width: 0 cm,
Line source is the combo box data source, binding column is the combo box is bound to the categories table which columns, the first column is the category ID, column width 0, the first column is hidden,
Name list of the combo box properties: line source: use the generator to create a query, query based on the name of the table: name, ID, name, category ID, in the condition of the category ID column, write this form the category of the combo box: [Forms]! [form]! [the need of the superior class combo box]
If SQL, the: SELECT the name list. The name of the ID, the name of the table. The name, the name of the table. The category ID FROM the name of the table WHERE (((the name of the table. The category ID)=[Forms]! [form]! [the need of the superior class combo box]));
Then, model combo box similarly, associated with the name column,
The general principle is this: the linkage of the triple combo box or multistage combo box, is a superior after combo box to select the data as a benchmark, the screening of the combo box at a lower level of optional items,
Class combo box binding the first column of a table, the ID column, after selecting, although we hide the column, can only see the word category, but the combo box of real data is digital, (in VBA, the combo box value attribute output ID, text attribute output shows words,) if you bind the second column of the table, then the combo box real data is the "category",
Because we need to form the category of the combo box to screen the name of the combo box to select the project, then the table name associated with the category table is just the category ID, so, in the combo box binding ID column category, the most convenient,
With the generator in form the name of the combo box to create a query, query is the name list, condition was limited to just the selected category ID,
CodePudding user response:
Writing prompt every time they open the form input parameters, how to turn off?CodePudding user response:
Do so after the first show is very normal, but many times when the category or name drop-down box click and replaced with other content, it to the next level drop-down list content is constant,The source of data for it can update?