P
Peter
when I click button in a form this event fires which attempts to query the db.
code is below.
strSQL = "SELECT SumOfAmount,Budget from dbo_qryJobExpenseTotalJDIDBudget
where jobdetailsID = " & List0.Column(4) & " and expensecodeid = " &
List0.Column(5)
Set rs = CurrentDb.OpenRecordset(strSQL)
There is no problem with the code, I have copied the strSQL sql statement
and run it successfully in a query.
I have searched the web and tried using querydefs etc as many answers to
other peoples questions seem to be this. But it has not worked for me.
I suspect that the problem is that I am doing a query Q1 on a query Q2, Q2
has a parameter off a form. I suspect that this is the problem. But not
sure how to fix it.
Any help would be greatly appreciated.
code is below.
strSQL = "SELECT SumOfAmount,Budget from dbo_qryJobExpenseTotalJDIDBudget
where jobdetailsID = " & List0.Column(4) & " and expensecodeid = " &
List0.Column(5)
Set rs = CurrentDb.OpenRecordset(strSQL)
There is no problem with the code, I have copied the strSQL sql statement
and run it successfully in a query.
I have searched the web and tried using querydefs etc as many answers to
other peoples questions seem to be this. But it has not worked for me.
I suspect that the problem is that I am doing a query Q1 on a query Q2, Q2
has a parameter off a form. I suspect that this is the problem. But not
sure how to fix it.
Any help would be greatly appreciated.