D
DS
This works unless the TxtCCExpDate field is left blank. If I leave that
field blank which it can sometimes be then I get a Syntax Error in Date
Query Expression. Any way of fixing this so that I can leave the
TxtCCExpDate field empty if I need to?
Thanks
DS
Me.TxtDepositID = Nz(DMax("[DepositID]", "Deposits"), 0) + 1
CurrentDb.Execute "INSERT Into
Deposits(DepositID,DepositDate,DepositAmount,Customer,Employee,Manager,Memo,DepositType,CardNumber,ExpDate)
" & _
"VALUES('" & Forms!AddDeposit!TxtDepositID & "'," & _
"#" & Forms!AddDeposit!TxtDepositDate & "#," & _
"'" & Forms!AddDeposit!TxtDepositAmount & "'," & _
"'" & Forms!AddDeposit!TxtCussID & "'," & _
"'" & Forms!AddDeposit!TxtEmployee & "'," & _
"'" & Forms!AddDeposit!TxtManager & "'," & _
"'" & Forms!AddDeposit!TxtMemo & "'," & _
"'" & Forms!AddDeposit!TxtDepositType & "'," & _
"#" & Forms!AddDeposit!TxtCCExpDate & "#," & _
"'" & Forms!AddDeposit!TxtCCNumber & "')"
field blank which it can sometimes be then I get a Syntax Error in Date
Query Expression. Any way of fixing this so that I can leave the
TxtCCExpDate field empty if I need to?
Thanks
DS
Me.TxtDepositID = Nz(DMax("[DepositID]", "Deposits"), 0) + 1
CurrentDb.Execute "INSERT Into
Deposits(DepositID,DepositDate,DepositAmount,Customer,Employee,Manager,Memo,DepositType,CardNumber,ExpDate)
" & _
"VALUES('" & Forms!AddDeposit!TxtDepositID & "'," & _
"#" & Forms!AddDeposit!TxtDepositDate & "#," & _
"'" & Forms!AddDeposit!TxtDepositAmount & "'," & _
"'" & Forms!AddDeposit!TxtCussID & "'," & _
"'" & Forms!AddDeposit!TxtEmployee & "'," & _
"'" & Forms!AddDeposit!TxtManager & "'," & _
"'" & Forms!AddDeposit!TxtMemo & "'," & _
"'" & Forms!AddDeposit!TxtDepositType & "'," & _
"#" & Forms!AddDeposit!TxtCCExpDate & "#," & _
"'" & Forms!AddDeposit!TxtCCNumber & "')"