Hi All,
I built a datasheet form based on query. This form is a sub form in another form and should present resaults for searching. for make it dynamic I change the SQL in the Qeury it based on. The query changed, but when requery the subform there is no change on it.
The following code is the one I'm using:
Set mydb = CurrentDb
Set MyQuery = mydb.QueryDefs("qryOrdersList")
MyQuery.SQL = mySTR
MyQuery.Close
Form_SubFrmOrdersList.Requery
(of course I put into mySTR SQl sentence before.)
the query working fine after the change, and return the right results.
Please advise
Thanks
I built a datasheet form based on query. This form is a sub form in another form and should present resaults for searching. for make it dynamic I change the SQL in the Qeury it based on. The query changed, but when requery the subform there is no change on it.
The following code is the one I'm using:
Set mydb = CurrentDb
Set MyQuery = mydb.QueryDefs("qryOrdersList")
MyQuery.SQL = mySTR
MyQuery.Close
Form_SubFrmOrdersList.Requery
(of course I put into mySTR SQl sentence before.)
the query working fine after the change, and return the right results.
Please advise
Thanks