larrydavid
Programmer
Hello,
I hope this isn't totally lame, but I've spent the past couple of hours beating my head against the wall (no more hair left) trying to find this data type mismatch. After saving a record I am trying to update a record in anmother table with a form id. I made sure that both ids in both tables are integers (numeric in Access) and the field I'm trying to update is a bit flag (Yes/No in Access).
Here is my VBA SQL statement which I am printing to the watch window and transferring to the Query Analyzer in SQL Server which executes perfectly. So, I'm thinking it's some Access-specifc syntax I'm missing, so any help is GREATLY appreciated as always:
Access VBA:
If Me.cboDisposition = "3" And (Me.txtComments <> Null Or Me.txtComments <> "") Then
strSQL = "UPDATE dbo_TESTTABLE SET [AdminPend] = '" & True & "' WHERE dbo_TESTTABLE.ID = '" & Me.ETID1 & "'"
dbs.Execute strSQL, dbSeeChanges
End If
Same query in SQL QA (which runs fine):
UPDATE dbo.TESTTABLE SET [AdminPend] = 'True'
WHERE dbo.TESTTABLE.ID = '152'
(AdminPend is a bit field with a default value of 0)
(ID is an int)
Thanks,
Larry
I hope this isn't totally lame, but I've spent the past couple of hours beating my head against the wall (no more hair left) trying to find this data type mismatch. After saving a record I am trying to update a record in anmother table with a form id. I made sure that both ids in both tables are integers (numeric in Access) and the field I'm trying to update is a bit flag (Yes/No in Access).
Here is my VBA SQL statement which I am printing to the watch window and transferring to the Query Analyzer in SQL Server which executes perfectly. So, I'm thinking it's some Access-specifc syntax I'm missing, so any help is GREATLY appreciated as always:
Access VBA:
If Me.cboDisposition = "3" And (Me.txtComments <> Null Or Me.txtComments <> "") Then
strSQL = "UPDATE dbo_TESTTABLE SET [AdminPend] = '" & True & "' WHERE dbo_TESTTABLE.ID = '" & Me.ETID1 & "'"
dbs.Execute strSQL, dbSeeChanges
End If
Same query in SQL QA (which runs fine):
UPDATE dbo.TESTTABLE SET [AdminPend] = 'True'
WHERE dbo.TESTTABLE.ID = '152'
(AdminPend is a bit field with a default value of 0)
(ID is an int)
Thanks,
Larry