D
DS
I have an SQL statement that is getting hung up on the percent field.
The data type in the table is Number, format is percent. The field on
the form is unbound with a percent format, 0 for the decimal places.
Dim PMSQL As String
DoCmd.SetWarnings False
PMSQL = "INSERT INTO PayName " & _
"(PaymentNameID,PaymentName,PaymentType,ExpirationDate,Active,CouponType,CouponWorth,CouponAmount,CouponPercent)
" & _
"Values(" & Forms!CouponNames!TxtID & ",'" &
Forms!CouponNames!TxtName & "'," & 3 & "," &
Format(Forms!CouponNames![TxtExp], "\#mm\/dd\/yyyy\#") & "," &
Forms!CouponNames![ChkActive] & "," & Forms!CouponNames!TxtType & ",'" &
Forms!CouponNames!TxtWorth & "'," & Forms!CouponNames!TxtAmount & "," &
Forms!CouponNames!TxtPercent & ")"
DoCmd.RunSQL (PMSQL)
DoCmd.SetWarnings True
Any help appreciated,
Thanks
DS
The data type in the table is Number, format is percent. The field on
the form is unbound with a percent format, 0 for the decimal places.
Dim PMSQL As String
DoCmd.SetWarnings False
PMSQL = "INSERT INTO PayName " & _
"(PaymentNameID,PaymentName,PaymentType,ExpirationDate,Active,CouponType,CouponWorth,CouponAmount,CouponPercent)
" & _
"Values(" & Forms!CouponNames!TxtID & ",'" &
Forms!CouponNames!TxtName & "'," & 3 & "," &
Format(Forms!CouponNames![TxtExp], "\#mm\/dd\/yyyy\#") & "," &
Forms!CouponNames![ChkActive] & "," & Forms!CouponNames!TxtType & ",'" &
Forms!CouponNames!TxtWorth & "'," & Forms!CouponNames!TxtAmount & "," &
Forms!CouponNames!TxtPercent & ")"
DoCmd.RunSQL (PMSQL)
DoCmd.SetWarnings True
Any help appreciated,
Thanks
DS