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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reqery Open Forms - Advice

Status
Not open for further replies.

onefootout

Technical User
Oct 23, 2007
42
US
I have several forms that are opened with a switchboard, all of which contain between 4-10 subforms. Each form stays open when you navigate away from it.

There's also this one misfit form (M), where I've put all my little fixes and user helper things. I'll update M, and the only way that update can be seen on Forms A & B is if they are closed and reopened.

I'm wondering if there's some way to requery all open forms? Or maybe a requery in the onfocus event of each main form? Is there something that makes more sense? I'd rather not have to stick a button on every form.

Thanks All!
 
You can just put code behind the on got focus property of each form. The code would be the simple statement:

me.requery

This will force the form to requery its data source when focus returns to the form.

The only time I would think that it would matter to update each form would be when that form is visible. If you have all of the forms visible and absolutely need to update all of them when you change the data on your form "M", then put a series of statements in an after update property for the appropriate control on that form (or even on a button on the form) that calls every form that is open by name with a requery. (i.e., myform.requery)

Bob
 
Thanks Bob,

I'll stick a me.requery in the got focus property, this does seem like the easiest way to go.

Thanks for taking the time to answer my kind of silly question!

Kate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top