I didn't see your post with the code before I replied. Here is my
recommendation with the update placed in your code.
Dim DiscountExpDate As String
DiscountExpDate = Nz(Format(Forms!frmBSDiscountNames![TxtExpDate],
"\#mm\/dd\/yyyy\#"),"")
DSQL = "INSERT INTO tblDiscounts " & _
"(DiscountID,DiscountName,DiscountDP,DiscountAmount,DiscountOpen,DiscountActive,DiscountExpire,DiscountExpDate,DiscountAction,DiscountTypeID,DiscountWhere,DiscountReportID)"
& _
"Values(" & Forms!frmBSDiscountNames!TxtID & ", " & _
"" & Chr(34) & Forms!frmBSDiscountNames!TxtName & Chr(34) & ", " & _
"'" & 1 & "', " & _
"'" & Forms!frmBSDiscountNames!TxtAmount & "', " & _
"" & Forms!frmBSDiscountNames![ChkOpen] & ", " & _
"" & Forms!frmBSDiscountNames![ChkActive] & "," &
Forms!frmBSDiscountNames![ChkExp] & ", " & _
DiscountExpDate & ", " & _
"'" & Forms!frmBSDiscountNames!TxtDiscountAction & "', " & _
"" & Forms!frmBSDiscountNames!TxtDiscountTypeID & ",'" &
Forms!frmBSDiscountNames!TxtDiscountWhere & "','" &
Forms!frmBSDiscountNames!TxtReportID & "')"
DoCmd.RunSQL (DSQL)
DS said:
This doesn't work either.
Nz(Format(Forms!frmBSDiscountNames![TxtExpDate],
"\#mm\/dd\/yyyy\#"),"Null")
AS DiscountExpDate
DS