Hi there,
I have an update query shown below:-
rs.Open "select [date] from vreport_workpackage_dates WHERE (WPID = 2878) and (milestone = 'integration end')", conn
strSQL = "UPDATE WorkPackages1 SET [planned start date]='" & Format(rs.Fields(0), "yyyy-mm-dd") & "' WHERE WPID=2878"
docmd.runsql
Where I have the criteria as 2878 in the rs.open statement I'd like replace this the value in a control on the form that triggers the query.
My problem is that if I put the control name in there it errors because the control is not part of the recordset.
Can anyone help with this please?
I have an update query shown below:-
rs.Open "select [date] from vreport_workpackage_dates WHERE (WPID = 2878) and (milestone = 'integration end')", conn
strSQL = "UPDATE WorkPackages1 SET [planned start date]='" & Format(rs.Fields(0), "yyyy-mm-dd") & "' WHERE WPID=2878"
docmd.runsql
Where I have the criteria as 2878 in the rs.open statement I'd like replace this the value in a control on the form that triggers the query.
My problem is that if I put the control name in there it errors because the control is not part of the recordset.
Can anyone help with this please?