Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

refresh all open forms

Posted on 2004-09-07
5
Medium Priority
?
385 Views
Last Modified: 2012-06-27
Hi All!

In a project, I have several forms and at any one time two or more forms can be open. Is there a simple method for refreshing the data on all open forms?

Thanks!
0
Comment
Question by:silsuba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 1000 total points
ID: 12000747
Dim frm As Form

For Each frm In CurrentDb.Forms
   frm.Refresh 'Or use frm.Requery, but this will return the form to the first record. It is required to show newly added records
Next
0
 

Author Comment

by:silsuba
ID: 12001097
shane;

Looks good, however when I run I get a method or data member found error on the .Forms

0
 

Author Comment

by:silsuba
ID: 12001143
Ok.. I got it..  

For Each frm in Forms ..

Works so far.. thanks!
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12001152
Hmm, is this an ADP?

Try this:

Dim frm As Object
For Each frm In CurrentProject.AllForms
   If SysCmd(acSysCmdGetObjectState,acForm,frm.Name)<>0 Then frm.Refresh
Next

Does that work?
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12001154
OK, if that fixes it, that's even better :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question