commanderrico
Technical User
Ok, I have two tables in my db. One has different turning lines and each line has the specific machines that are on the line. My other table is for the downtime of those machines where the user will input the date, employee, shift, problem, what line it was on, what machine, etc. So what I want to do is have combo boxes on the form to choose the line and the machine. The first combo box would have the line in it and then the next would, depending on what line you picked, bring up the machines on that line. In other words, the combo boxes are referencing the information in the first table and I want the information they reference to be entered in the second table. The code in the first and second combo boxes are as follows:
First Combo Box:
SELECT [Mac Dept LO/TO Proc].Line FROM [Mac Dept LO/TO Proc] GROUP BY [Mac Dept LO/TO Proc].Line ORDER BY [Mac Dept LO/TO Proc].Line;
Second Combo Box:
SELECT [Mac Dept LO/TO Proc].[Specific Equipment] FROM [Mac Dept LO/TO Proc] GROUP BY [Mac Dept LO/TO Proc].[Specific Equipment], [Mac Dept LO/TO Proc].[Specific Equipment] HAVING (((Mac Dept LO/TO Proc.Line)=[Forms]![Data Entry]![cbxLine])) ORDER BY [Mac Dept LO/TO Proc].[Specific Equipment];
When I try to run the form as it is it asks for the parameters for [Mac Dept LO/TO Proc.Line] How can I make the combo boxes reference one table but enter the information in another? Thanks for your help.
Rico
First Combo Box:
SELECT [Mac Dept LO/TO Proc].Line FROM [Mac Dept LO/TO Proc] GROUP BY [Mac Dept LO/TO Proc].Line ORDER BY [Mac Dept LO/TO Proc].Line;
Second Combo Box:
SELECT [Mac Dept LO/TO Proc].[Specific Equipment] FROM [Mac Dept LO/TO Proc] GROUP BY [Mac Dept LO/TO Proc].[Specific Equipment], [Mac Dept LO/TO Proc].[Specific Equipment] HAVING (((Mac Dept LO/TO Proc.Line)=[Forms]![Data Entry]![cbxLine])) ORDER BY [Mac Dept LO/TO Proc].[Specific Equipment];
When I try to run the form as it is it asks for the parameters for [Mac Dept LO/TO Proc.Line] How can I make the combo boxes reference one table but enter the information in another? Thanks for your help.
Rico