C
Chrissy
Syntax error (missing operator) in query expresssion '[AppInvNum] ='
I get the above message running the following code. Basically, I am
entering an invoice and then opening another form to apply a credit. This
first delete code works when the user quits the invoice entry without a
credit applied.
This is a case where the user changes mind about invoice entry and, if
credit is applied, both the invoice and the application of credit need to go
away.
'deletes current job record
strSQL = "DELETE FROM [tbl 2 Job] " & "WHERE [InvNum] = " & [txtInvNum]
CurrentDb.Execute strSQL, dbFailOnError
'deletes credit applied if record exists.
strSQL1 = "DELETE FROM [tbl 1 ClientCreditApplied] " & "WHERE [AppInvNum] =
" & [txtInvNum]
CurrentDb.Execute strSQL1, dbFailOnError
I wasn't sure if strSQL could be used for both, so I DIM'd strSQL1.
The table names and fields are correct.
I read that this could indicate a Null field...but it is not null, the
credit application record does exist correctly.
I get the above message running the following code. Basically, I am
entering an invoice and then opening another form to apply a credit. This
first delete code works when the user quits the invoice entry without a
credit applied.
This is a case where the user changes mind about invoice entry and, if
credit is applied, both the invoice and the application of credit need to go
away.
'deletes current job record
strSQL = "DELETE FROM [tbl 2 Job] " & "WHERE [InvNum] = " & [txtInvNum]
CurrentDb.Execute strSQL, dbFailOnError
'deletes credit applied if record exists.
strSQL1 = "DELETE FROM [tbl 1 ClientCreditApplied] " & "WHERE [AppInvNum] =
" & [txtInvNum]
CurrentDb.Execute strSQL1, dbFailOnError
I wasn't sure if strSQL could be used for both, so I DIM'd strSQL1.
The table names and fields are correct.
I read that this could indicate a Null field...but it is not null, the
credit application record does exist correctly.