Hi,
For below code I'm getting Run-time error '3464' Datatype mismatch in criteria expression Error.
Please help me to solve this code.
Private Sub Save_Click()
If IsNull(Customer) Or IsNull(Cust_PO_No) Or IsNull(Cust_PO_Date) Or IsNull(Ship_To) Or IsNull(PO_line_item) Or IsNull(Item_No) Or IsNull(Dwg_rev_No) Or IsNull(PO_Qty_Blanket) Or IsNull(PO_Qty_Release) Or IsNull(Unit_Price) Or IsNull(ModeOf_Shipment) Or IsNull(Delivery_Terms) Or IsNull(Cust_Requested_Date) Or IsNull(Succinnova_Committed_date) Then
MsgBox "Please Fill Empty Fields ", , "Details required"
Else
If MsgBox("Do you want to submit the details of Order_Processing Form?", vbYesNo + vbQuestion) = vbYes Then
CurrentDb.Execute "INSERT INTO Order_Processing_Table([OCNumber],[Customer],[Cust_PO_No],[Cust_PO_Date],[Ship_To],[PO_line_item],[Item_No],[Dwg_rev_No],[PO_Qty_Blanket],[PO_Qty_Release],[Unit_Price],[Type_of_Currency],[ModeOf_Shipment],[Delivery_Terms],[Cust_Requested_Date],[Succinnova_Committed_date],[Remarks])" & _
"VALUES('" & Me.OCNumber & "','" & Me.Customer & "','" & Me.Cust_PO_No & "','" & Me.Cust_PO_Date & "','" & Me.Ship_To & "','" & _
Me.PO_line_item & "','" & Me.Item_No & "','" & Me.Dwg_rev_No & "','" & Me.PO_Qty_Blanket & "','" & Me.PO_Qty_Release & "','" & Me.Unit_Price & "','" & Me.Type_of_Currency & "','" & Me.ModeOf_Shipment & "','" & Me.Delivery_Terms & "','" & Me.Cust_Requested_Date & "','" & Me.Succinnova_Committed_date & "','" & Me.Remarks & "')"
MsgBox "Details Submited to Order_Processing_Table"
Me.OCNumber.Value = Null
Me.Customer.Value = Null
Me.Cust_PO_No.Value = Null
Me.Cust_PO_Date.Value = Null
Me.Ship_To.Value = Null
Me.PO_line_item.Value = Null
Me.Item_No.Value = Null
Me.Dwg_rev_No.Value = Null
Me.PO_Qty_Blanket.Value = Null
Me.PO_Qty_Release.Value = Null
Me.Unit_Price.Value = Null
Me.ModeOf_Shipment.Value = Null
Me.Delivery_Terms.Value = Null
Me.Cust_Requested_Date.Value = Null
Me.Succinnova_Committed_date.Value = Null
Me.Remarks.Value = Null
Else
Me.OCNumber.Value = Null
Me.Customer.Value = Null
Me.Cust_PO_No.Value = Null
Me.Cust_PO_Date.Value = Null
Me.Ship_To.Value = Null
Me.PO_line_item.Value = Null
Me.Item_No.Value = Null
Me.Dwg_rev_No.Value = Null
Me.PO_Qty_Blanket.Value = Null
Me.PO_Qty_Release.Value = Null
Me.Unit_Price.Value = Null
Me.ModeOf_Shipment.Value = Null
Me.Delivery_Terms.Value = Null
Me.Cust_Requested_Date.Value = Null
Me.Succinnova_Committed_date.Value = Null
Me.Remarks.Value = Null
MsgBox "Details Not Submited"
Exit Sub
End If
End If
End Sub