Here is what I am trying to accomplish.
I have 2 Forms frm_NewCustomerEntry and frm_NewOrderEntry2.
I want to create a button that allows the user to fill in a new customer's data and then proceed directly to the Order Form with the Customer ID and Store ID (Which CustomerEntry Inherited from the Switchboard) Populated in the new form.
I have validation rules in both the Table and Form for the same fields as I worried this might be causing the problem. No Joy. Have tried splitting the functions into 2 buttons.
Button 1: cmdSaveRecord has on the OnClick Event.
If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
Forms!frm_CustomerEntry!cmdNewOrder.enabled = True
Forms!frm_CustomerEntry!cmdNewOrder.SetFocus
Else
MsgBox "There were no modifications made to the current record.", vbInformation, "Invalid Save"
End If
Button 2: cmdNewOrder has on the OnClick Event
DoCmd.OpenForm "frm_NewOrderEntry2", acNormal, , , acFormAdd
Forms!frm_NewOrderEntry2.cboCustomer = Me.ID
Forms!frm_NewOrderEntry2.cboStore = Forms!frm_NewCustomerEntry!StoreInfo_ID
DoCmd.Close acForm, "frm_NewCustomerEntry", acSaveNo
I get a runtime 3316 error not the validation message.
Suggestions and Help Greatly appreciated