[AccessD] Main form requery help needed

Rocky Smolin rockysmolin at bchacc.com
Mon Oct 29 12:29:44 CDT 2012


In the after update event of the person information form try your requery
statement Forms![frmHousehold]!sfrmPeople_in_HH.Form.Requery.

Or maybe in the gotFocus event of the main form?

I'm guessing the main form's current event is not firing.

You could put a msgbox "Hello 'dere"  in the main form's current event and
see if it is firing.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris
Fields
Sent: Monday, October 29, 2012 10:20 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Main form requery help needed

Hi,

I have a main form for households, with a subform showing the people in the
given household.  When I want to add a person to the household, I click a
button to open the person information form in add mode.  When I close the
person information form, I want the main form to requery and update the
subform.  If I close the main form and reopen it, the subform is updated,
but I would prefer it to update without the main form having to be closed
and reopened.

I thought that I could make use of the main form's "On Current" event sort
of like this:

Private Sub Form_Current()
     Forms![frmHousehold]!sfrmPeople_in_HH.Form.Requery
End Sub

This does not work.  So, I am doing something wrong and I don't see what it
is.  Asking for other eyes to look at it.

Main form is named frmHousehold.  The subform control is named
sfrmPeople_in_HH.

What am I doing wrong?

Tina

--
Tina Norris Fields
tinanfields at torchlake.com
231-322-2787

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list