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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting alternate row data based on autonumber ID

Status
Not open for further replies.

smokyjoker

IS-IT--Management
Jun 23, 2004
4
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top