473,396 Members | 2,108 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,396 software developers and data experts.

OpenForm command...

Hi all,

In my current project, I open other forms from within my 'Parentform'.
In this parentform, dates of the selected forms are queried. Each time,
the parentform (frmParentForm) is minimized (DoCmd.Minimize) when a
'subform' is openend. When the report for the specific date is
completed, I close the subform by a close button:

Private Sub btnClose_Click()
On Error GoTo Err_btnClose_Click

DoCmd.Close
DoCmd.OpenForm "frmParentForm", acNormal (**)

Exit_btnClose_Click:
Exit Sub

Err_btnClose_Click:
MsgBox Err.Description
Resume Exit_btnClose_Click

End Sub

When the parentform is shown again, the last report date is not yet
displayed. How can I easily refresh the parentform after it is opened? (**)

Thanks in advance,

Kurt.
Nov 13 '05 #1
1 1679
Why not just set the controlsource (query) for the subform to have the date
from the parentform as the criteria:
in the query criteria enter:

[forms]![parentformname]![datefieldname]

or if you have 2 dates

between [forms]![parentformname]![STARTdatefieldname] &
[forms]![parentformname]![ENDdatefieldname]

Then close or hide the parent form when the subform opens.

HTH
Paul

"Kurt Blom" <Ku*******@UGent.be> wrote in message
news:cm**********@gaudi2.UGent.be...
Hi all,

In my current project, I open other forms from within my 'Parentform'. In
this parentform, dates of the selected forms are queried. Each time, the
parentform (frmParentForm) is minimized (DoCmd.Minimize) when a 'subform'
is openend. When the report for the specific date is completed, I close
the subform by a close button:

Private Sub btnClose_Click()
On Error GoTo Err_btnClose_Click

DoCmd.Close
DoCmd.OpenForm "frmParentForm", acNormal (**)

Exit_btnClose_Click:
Exit Sub

Err_btnClose_Click:
MsgBox Err.Description
Resume Exit_btnClose_Click

End Sub

When the parentform is shown again, the last report date is not yet
displayed. How can I easily refresh the parentform after it is opened?
(**)

Thanks in advance,

Kurt.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Aravind | last post by:
Hi folks. I have 2 forms, frmMain and frmHistory. frmHistory has a field called Return. frmMain has a command button called "Due Today" (which will henceforth be called as DT), which opens...
3
by: Lyn | last post by:
Hi, I have a Search input form which collects from the user a person's name. I am using LIKE with a "%" suffix in the SQL so that the user does not have to type in the full name. When they hit...
2
by: John Phelan-Cummings | last post by:
After creating a button on a (parent) form linking to another (child) form, I received the following error when clicking on the command button: "The OpenForm action was canceled" No the child...
15
by: Thelma Lubkin | last post by:
formA determines some_where and some_value and issues docmd.close ,Me docmd.openform "formB", , ,some_where, , ,some_value formB receives the correct some_where and some_value After...
8
by: John Welch | last post by:
I have a command button with the following code: DoCmd.OpenForm "frmSearchAssignments", , , "SearchAssignmentID = 1" (SearchAssignmentID is the PK, auto number) When it runs, the form opens but...
3
by: victoria.rego | last post by:
Hi there, My application is generating a "The OpenForm action was cancelled" error and I can't seem to figure out why. The best part about it is that it's only one user in the entire building -...
3
martintallett
by: martintallett | last post by:
Help! I am trying to replace the Access Find button functionality on an old database. I can make it work when I use a basic form with bound fields and a button which shows a popup form which...
1
by: rdsandy | last post by:
Hi, I am using Access 2003. I have a list box on a form which has 6 columns in it, with data taken from a table. I have an unbound text box which holds the ID number for the selected item in the...
1
by: silen | last post by:
i am using Access2000. Currently i had a main form call "frmDownload" and sub form "fsubAdmmission". Under the fsubAdmmission, i do have another sub form "fsubHospital". Once i link my application to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.