Access2016, subform.requery did not work. subform based on query2 and query2 based on query1. I changed SQL text of query1 in VBA and want subform.requery to reflect the changes. The code goes as below:
Code:
dim db as database
dim qry as querydef
set db=currentdb
set qry=db.querydefs("query1")
qry.SQL=some string
me.subform1.form.requery
--------------------------------------
result:
1-sub form did not reflect changes.
2-I checked query1 and query2, they work properly.
3-if I close form and reopen it, it works! reflect all changes as I expected.
I can provide database file for details.
Please help. Thanks a lot!