Okay, let's start by creating a new form.
1. Open a form in design mode(New). Do not select a table or query. This will be an UNBOUND form. Create a ComboBox on the form and call it cboLineCombo. Open the combobox's property list. Select Efficiency Table for the Row Source. set the Bound Column to 1, Column Count = 1, Column Widths = ?? However wide you need it to be to display the Line data. Just enter it as a number in inches. Set Scroll Bars= Neither, AutoCenter= Yes, Modal= No, Popup= No, Navigation Buttons = No. Close and Save the form and call it frmLinePrompt.
2. Create a command button and call it cmbOKButton. Enter Open Report in the Caption Property or whatever you want it to say. Size and place the button on the form where you wish.
3. Put this code in the OnClick Event Procedure of the command button.
DoCmd.OpenReport "rptYourReportName", acViewNormal
4. Use this as an example of the SQL to be placed in your query:
Select A.*
FROM [Production Summary] as A
WHERE A.Line = FORMS![frmLinePrompt]![cboLineCombo];
Use this example to update the WHERE clause in the query that feeds the report. I don't think I have left anything out but if I have please post back with questions.
Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???