简体   繁体   中英

Access 2010 Populate Subform with Query

I think this is an overly easy question but my brain is failing to work so I need some help.

I have a form that in a nutshell has the user enter a start date and end date into 2 date/time text boxes. I have a query that filters out the records that fall between the specified dates.

What I want to do is have a subform populate/refresh anytime an After Update of either of these text fields are adjusted so long as both have values, (ie if one is blank there will be no changes).

Im sure this is straight forward so any tips is much appreciated!

It depends on how you have set up the subform. You can use the after update events of the textboxes to set the recordsource of the subform or to requery.

 Me.MySubformcontrolName.Form.Recordsource ="Select ..."
 Me.MySubformcontrolName.Form.Requery

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM