Hello. I have database where part information is to be stored. There are separate tables for different part "families". The separate tables are necessary because each part family has a unique set of attributes, and as a result the columns of each table need to be different. For user simplicity, there is only 1 main form that filters through these tables using combo boxes and VBA. As each combobox is popluated, the records are filtered further and further until you arrive at a part number. While the main form is working great, I was hoping to have a subform that shows the filtered records in Datasheet view. Because the fields are dynamic from 1 part family to the next, I cannot figure out how to link the textboxes in the subform to the data being filtered by the combo boxes in the main form. Although I can follow along with VBA code, I'm relatively new to both access and VBA so I get stuck when I need to develop code froms cratch on my own. Any advice or input would be appreciated.
Last edited by jhalfhill; 04-21-16 at 10:09.
Reason: Wrong attachment
If you are going to have many combos that filter as you go, then use vb.
youd execute it after EVERY control afterupdate
if not isnull(cboState) then sWhere = " and [state]='" & cboState & "'"
if not IsNull(cboName) then sWhere = sWhere & " and [Name]='" & txtName & "'"
if not IsNull(chkContact) then sWhere = sWhere & " and [Contact]=" & chkContact.value
'remove 1st And
me.subform.form.filteron = true