Solved

refresh all open forms

Posted on 2004-09-07
5
363 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now