A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Open form behavior



 
 
Thread Tools Display Modes
  #1  
Old May 2nd, 2008, 08:09 PM posted to microsoft.public.access.forms
Rickety107
external usenet poster
 
Posts: 3
Default Open form behavior

I have a form frmLookup that displays all of the programs. If the user click
the button next to that program it will open a new form frmEvent with all of
the program information. frmevent is opened using the following code
stDocName = "frmEvent"
stLinkCriteria = "[programid] = " & Me.ProgramID
stOpenArg = ""

DoCmd.OpenForm stDocName, , , stLinkCriteria, , , stOpenArg

frmLookup does not close.

frmEvent has alot of subfrms on it as well. There is code on the form_unload
event of some of these subforms. I have found out that some users are not
closing frmEvent before they load another program. With frmEvent still open
and displaying the information about programA they are bringing up the lookup
screen and choosing another program say ProgramB. Since frmEvent is already
open, when the docmd.openform is called to display the information of
programB, does Access realize the form is already open and just requery the
data for the new program or does it actually close the form and reopen it.

I need to know this to determine if the form_unload events are being called
in this scenario.
  #2  
Old May 2nd, 2008, 08:48 PM posted to microsoft.public.access.forms
Naeem Azizian
external usenet poster
 
Posts: 13
Default Open form behavior

On May 2, 11:09 pm, Rickety107
wrote:
I have a form frmLookup that displays all of the programs. If the user click
the button next to that program it will open a new form frmEvent with all of
the program information. frmevent is opened using the following code
stDocName = "frmEvent"
stLinkCriteria = "[programid] = " & Me.ProgramID
stOpenArg = ""

DoCmd.OpenForm stDocName, , , stLinkCriteria, , , stOpenArg

frmLookup does not close.

frmEvent has alot of subfrms on it as well. There is code on the form_unload
event of some of these subforms. I have found out that some users are not
closing frmEvent before they load another program. With frmEvent still open
and displaying the information about programA they are bringing up the lookup
screen and choosing another program say ProgramB. Since frmEvent is already
open, when the docmd.openform is called to display the information of
programB, does Access realize the form is already open and just requery the
data for the new program or does it actually close the form and reopen it.

I need to know this to determine if the form_unload events are being called
in this scenario.


It will not close the form, it will just remove the filter and then
filters it again for the new value. It however, "saves" the record,i
you want the events in the unload to happen, by refiltering the form,
it'd be more practical to put those in the afterupdate event of the
form.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.