Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform Requery Problem

Status
Not open for further replies.

fridge74

Technical User
May 28, 2003
10
US
I have a main form built off of a query with 4 or 5 subforms, each built off seperate queries. I created the subforms as regular forms and dropped them on a tabs. The forms when i built them have macro requery on them that runs off a timer interval (every 2 minutes). When I run the main form and the timer on the subform goes off I get this message.

You can't use the ApplyFilter action on this window.

*You tried to use the ApplyFilter action or method, but didn't apply the filter to a table,query, form or report
*You may have applied the filter to a form, but the form wasn't open in Form or Datasheet view.
*You may have applied the filter to a report, but didn't use the ApplyFilter action in a macro specified by the OnOpen property setting.

Use the SelectObject action or method to select the table,query, form, or report before applying the filter.


Being fairly new to Access, and reading books and looking at the web I am stuck. Any help would be appreciated.
 
Why are you requerying them every 2 minutes? Does information on the main form need to change fields on any of the subforms?

John Green
 
The Main form has rail car unloading status on it. This includes CarNumber, Status, Heating and wether Caps have been checked. The subforms deal with truck information which really has no relation with the main form. The reason for the requery interval is so that the subforms update. The Scale house will input outbound truck info and out bound info. This info then needs to reflect on the subform. Then the unloaders can select from a dropdown list of TruckStatus and TruckLocation. Indidually as forms this works great, but when I try to incorporate it with the Main Rail Form (to have one form) is whne it errors out on me. I was thinking perhaps there was a way in VB to just requery the subforms and not affect the Main form.
 
I've never run into a need to do anything quite like this, but I have found requerying subforms can be tricky. What I would try is requerying the subforms from the main form using the On Timer event. If anyone else has any other ideas please jump in and let us know.

John Green
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top