smokyjoker
IS-IT--Management
Hello--
I have a four tables called LitGroup, LitGroupType, LitGroupSubType, and LitGroupStyle. I have all four tables set up as a series of one-to-many relationships (There are many LitGroupType values for one LitGroup row, and so on. I have a combo box in a form bound to a unique ID to limit the values in another combo box. To do this I inserted this SQL statement on in the rowsource variable for the control: SELECT LitGroup.LitGroupTypeID, LitGroupType.Description, LitGroupType.Value, LitGroupType.LitGroupID FROM LitGroupType WHERE (((LitGroupType.LitGroupID)=forms!PartNumberLookup!LitGroup)) ORDER BY LitGroupType.Value;
I have bound the combo box to the LitGroupTypeID. However, I need the LitGroupType.Value to concatenate into a part number field. I was thinking that I could make a text box that would have a control source like "...[Edition] & "" & (SELECT LitGroup.Value From LitGroup WHERE (((LitGroup.LitGroupID)=forms!PartNumberLookup!LitGroup))) & "" & (SELECT LitGroupType.Value From LitGroupType WHERE (((LitGroupType.LitGroupTypeID)=forms!PartNumberLookup!LitGroupType)))..." But this does not work. I get the #Name? error in the part number field. Maybe my syntax is incorrect?
I have a four tables called LitGroup, LitGroupType, LitGroupSubType, and LitGroupStyle. I have all four tables set up as a series of one-to-many relationships (There are many LitGroupType values for one LitGroup row, and so on. I have a combo box in a form bound to a unique ID to limit the values in another combo box. To do this I inserted this SQL statement on in the rowsource variable for the control: SELECT LitGroup.LitGroupTypeID, LitGroupType.Description, LitGroupType.Value, LitGroupType.LitGroupID FROM LitGroupType WHERE (((LitGroupType.LitGroupID)=forms!PartNumberLookup!LitGroup)) ORDER BY LitGroupType.Value;
I have bound the combo box to the LitGroupTypeID. However, I need the LitGroupType.Value to concatenate into a part number field. I was thinking that I could make a text box that would have a control source like "...[Edition] & "" & (SELECT LitGroup.Value From LitGroup WHERE (((LitGroup.LitGroupID)=forms!PartNumberLookup!LitGroup))) & "" & (SELECT LitGroupType.Value From LitGroupType WHERE (((LitGroupType.LitGroupTypeID)=forms!PartNumberLookup!LitGroupType)))..." But this does not work. I get the #Name? error in the part number field. Maybe my syntax is incorrect?