Query By Form Using Same Sub Form and Main Form

T

Tom LeBold

Having problems displaying query results from combo boxes on a sub
form, which is on the same form that is used to select criteria.
This has always worked form me when displaying query results on
another main and sub form.
The requery on the sub form and refresh comands on the main form do
not work when the form is first displayed and when the selection
criteria is changed.
Should I be doing a refresh and then repaint of the sub form.


' Creates saved query in the database container for the sub form
Call BuildSql("")

' The following commented line correctly displays query results on a
seperate sub form that has the results from the criteria selected on
the form currently in use.
'Docmd.OpenForm "MainFormSeachResults


' The following two lines attempt to display the results on a sub form
which is on the same form where the criteria is selected:


Me.frmSubFormResults.Requery
Me.Refresh
<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top