activating a query in form view

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that consists of five tabs. The first tab is owner information
that was created from a table and a list of residents occupying the property
also created from an underlying table (subform). The third tab was created
from a query of which the first three columns is a list of residents taken
from the resident table. My problem is when under the first tab I enter
residents, then go to the third tab, they do not show up unless I close the
form and re-open it again, at which time they do show up. Is there anyway to
make this query run when just moving to the third tab without closing the
form? Again, this only happens when I entered new residents. I hope I have
been clear enough. Thanks. Dorothy
 
Use the After Update event of the form to Requery the subform on page 3.
 
Hi Allen,

Can you describe how to do this? Not very familiar with events. Thanks.
Dorothy
 
1. Open the main form in design view.

2. Open the Properties box (View menu).

3. Make sure the title bar of the Properties box reads Form, i.e. you are
looking at the properties of the form, not those of a text box.

4. Click the After Update property (Event tab of Properties box).

5. Set it to:
[Event Procedure]

6. Click the Build button (...) beside this property.
Access opens the code window.

7. Between the "Private Sub..." and "End Sub", enter this line:
Me.[NameOfYourSubformControlHere].Form.Requery
 

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

Back
Top