Solved

refresh all open forms

Posted on 2004-09-07
5
368 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
  • 3
  • 2
5 Comments
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 250 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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 …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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