Mike Montgomery
asked on
Requery a Query in a Subform
I have a database with one main form and in it are two sub forms. Sub form 1 updates a separate table. Sub form 2 displays the results of a query based upon the input from subform 1. When the user adds information to the table, I need the query to re-run (or the sub-form 2 to requery) when new data is added to the table. However using Requery [code_to_subform2] nothing appears to happen. I guess I am on the wrong track here ..
any help on this would be appreciated.
Thanks,
Mike
any help on this would be appreciated.
Thanks,
Mike
ASKER
Didnt quite work, however it put me on the right track and I have it working now. Thank you... If you re-submit as an answer I will give you the points.
Mike
Mike
ASKER
For info I did the folowing:
DoCmd.GoToRecord , , acNewRec
Forms![MainForm]![SubForm2 ].Form.Req uery
I had to do this through a click_event on a button. First it updates
the table with the new info and goes to a new record, then your code (slightly modified) after this event.
Thanks again
MIke
DoCmd.GoToRecord , , acNewRec
Forms![MainForm]![SubForm2
I had to do this through a click_event on a button. First it updates
the table with the new info and goes to a new record, then your code (slightly modified) after this event.
Thanks again
MIke
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dedushka:
Er, you forgot to mark you acceptance as an answer.
Er, you forgot to mark you acceptance as an answer.
Try to do this in Subform1 AfterUpdate event:
me!Parent!Subform2.Form.Re
Regards,
Dedushka