473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Refreshing a form - automatically

6
How do I get a form to automatically refresh once (not continually using a timer).

The scenario I have uses a parent table and a child table.
(thanks to mmcarthy for indicating better termenology than I was using)
I have a main form that displays one page per parent record and all the related child records in a sub-form.
I then have a second form from which I can select records to be added (appended) to the child records. When the second form closes a query appends selected records to the child table. The problem I cannot solve is to get the main form, in particular to sub-form section, to update (refresh) automatically after I close the second form.

thanks
Iain
Sep 4 '06 #1
3 2753
MMcCarthy
14,534 Expert Mod 8TB
In the On Close (Button click or whatever) event on the second form put the following code. Be careful of the subform name, check the name under the Properties in the Other tab.

[CODE ]

Forms("NameOf ParentForm")![SubformName].Requery

[/code]

How do I get a form to automatically refresh once (not continually using a timer).

The scenario I have uses a parent table and a child table.
(thanks to mmcarthy for indicating better termenology than I was using)
I have a main form that displays one page per parent record and all the related child records in a sub-form.
I then have a second form from which I can select records to be added (appended) to the child records. When the second form closes a query appends selected records to the child table. The problem I cannot solve is to get the main form, in particular to sub-form section, to update (refresh) automatically after I close the second form.

thanks
Iain
Sep 4 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
Sorry the CODE indicators shouldn't be showing

In the On Close (Button click or whatever) event on the second form put the following code. Be careful of the subform name, check the name under the Properties in the Other tab.


Expand|Select|Wrap|Line Numbers
  1.  
  2. Forms("NameOf ParentForm")![SubformName].Requery
  3.  
  4.  
Sep 4 '06 #3
Iain
6
Thank you very much.

I had got close to the solution but had not realised that I must direct the requery command.

Iain
Sep 5 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: bss2004 | last post by:
Hi- I have a couple of pages on my asp.net site that take a few minutes to process after the user clicks the submit button. An example is a page that kicks off a Crystal Report that is printing a...
1
by: Dmitry Karneyev | last post by:
Hi! How to force refreshing databinded controls of the win form?
1
by: Steve Teeples | last post by:
How do you force a form to refresh itself if the contents of the form become corrupted? For example, while moving a second form over the first, I want to force a refresh of the first. -- Steve
3
by: Aitham alama | last post by:
Hi There, My question is as following, I have a webform (Webform1) which contains one label control and command button, when the user clicks the button another webform (Webform2) appears,...
0
by: Tony Botelho | last post by:
I am fairly new to VB.NET and I am having some difficulty working with a bound listbox. On a simple form, I open a connection to my database and load a dataser. I then bind a listbox to the the...
1
by: Iain | last post by:
I am attempting to create an "easy input (from the pov of the user)" form. A main form displays one page per record with a sub form displaying a list of records related to the main record. The...
0
by: sean.hpr | last post by:
Hi all- I am a vb2005 newb so apologies in advance. Essentially I am having some problems with data refreshing on some of my forms. Background: I have created a project containing a few...
6
by: shankari07 | last post by:
hi guys, I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file. Through php...
2
by: Jeff | last post by:
I have a Form parent window with a list view on it. When I click on an item I open another form to edit the details - this is not and cannot be a dialog window. When I close the child window I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.