1 field(s) set to Null due to type conversion.
Here's the code:
Expand|Select|Wrap|Line Numbers
- Dim strSQL As String
- Dim Eff_Date As Long
- Eff_Date = Me.Eff_Date
- strSQL = "INSERT INTO tblMPR_Price([MPR_ID],[SKU],[Discount],[Eff_Date]," & _
- "[DeadOld],[DeadNew],[MAPOld],[MAPNew],[InvOld],[InvNew],[Rate]) " & _
- "VALUES ('" & Me.[MPR_ID] & "','" & Me.[SKU] & "','" & Me.[Discount] & "'," & Eff_Date & _
- ",'" & Me.[DeadOld] & "','" & Me.[DeadNew] & "','" & Me.[MAPOld] & _
- "','" & Me.[MAPNew] & "','" & Me.[InvOld] & "','" & Me.[InvNew] & _
- "','" & Me.[Rate] & "');"
- DoCmd.RunSQL strSQL
Dead*, MAP* and Inv* fields are currency
Rate is Number
Eff_Date is Date
MPR_ID is Number
SKU and DISCOUNT are Text
I've noticed it seems to be linked to if the "DeadOLD" and "MapOLD" fields have a null value (since the value is populated by a query, if there's no match in the product type, no OLD pricing is pulled). Any ideas on how to handle this? The data gets tansferred still, it's just a nuissance.