G
Guest
I've got a form running a bunch of queries, the last query updates a field
"intPerc" that shows what percent the current value is of the yearly total:
dim db as DAO.Database
set db = CurrentDB
db.Execute "UPDATE tempDR AS A LEFT JOIN tempYearSum AS B ON A.txtLoanNo =
B.txtLoanNo AND A.dteBegin Like " * " & B.BgtYear SET A.intPerc =
[A].[intActExp]/.[Total];"
'updates the percentage of each disbursement/year
When the form runs this update query I get the Error '13' runtime error,
Type mismatch.
If I copy the SQL into a blank Query's SQL view, and click run, the query
runs with no problems.
Any one have any ideas why this update doesn't work in VBA but it does as an
Access Query?
-Matt
"intPerc" that shows what percent the current value is of the yearly total:
dim db as DAO.Database
set db = CurrentDB
db.Execute "UPDATE tempDR AS A LEFT JOIN tempYearSum AS B ON A.txtLoanNo =
B.txtLoanNo AND A.dteBegin Like " * " & B.BgtYear SET A.intPerc =
[A].[intActExp]/.[Total];"
'updates the percentage of each disbursement/year
When the form runs this update query I get the Error '13' runtime error,
Type mismatch.
If I copy the SQL into a blank Query's SQL view, and click run, the query
runs with no problems.
Any one have any ideas why this update doesn't work in VBA but it does as an
Access Query?
-Matt