I want to open a form with the where method but It gives me an error
Run-Time error "2501"
The Openform action was canceled
You used a method of the DoCmd object to carry out an action in Visual basic, but then clicked cancel in a dialog box
Can you please help me figure out what is wrong with my code
Expand|Select|Wrap|Line Numbers
- DoCmd.OpenForm "frm_Reporting_Defect_History", , , "dbo_GS_LMS_DEFECT_SHEETS.CUSTOMER_NAME = '" & Forms!frm_Main.cbCustomer & _
- "' And dbo_GS_LMS_DEFECT_SHEETS.WO_NUMBER = '" & Forms!frm_Code_Repeat_Shoppings.[PostWorkOrderNum] & _
- "' And dbo_GS_LMS_DEFECT_SHEETS.LOCOMOTIVE_ID = '" & _
- Forms!frm_Code_Repeat_Shoppings.[tbLocoID] & "'"