UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> close front form...    
 
   
kbrewster
post Jul 27 2004, 04:04 PM
Post #1

UtterAccess VIP
Posts: 4,489
From: NH



Say I have 3 forms open...I want to close the form that is in the front...or the one that has focus.

I want it to be used on any form, so I don't want the code to include the form name.

Thanks!
Go to the top of the page
 
+
BrianS
post Jul 27 2004, 04:26 PM
Post #2

UtterAccess VIP
Posts: 5,597
From: St. Louis, MO



I think you can refer to the active form with
CODE
Screen.ActiveForm

CODE
Docmd.Close acForm, Screen.ActiveForm

The only trick is going to be where you call this code from. I would create a Public function in a standard code module and call it from anywhere that is neccessary.
Go to the top of the page
 
+
kbrewster
post Jul 27 2004, 04:32 PM
Post #3

UtterAccess VIP
Posts: 4,489
From: NH



I am using it on a menu bar...
Go to the top of the page
 
+
kbrewster
post Jul 27 2004, 05:33 PM
Post #4

UtterAccess VIP
Posts: 4,489
From: NH



I want a form that has a tree view on it...already created that. The treeview has a main category "Patient Information", then sub categories "Demographics", "Test Results".

What I would like to happen is to have the SAME form change to whatever the users chooses. So if the user is in "frmPatientInformation" and has chosen "Demographics" from the tree view the patients demographics would show up...then they click "Test Results" and I want the test results for the patient to show up...BUT without opening new forms on top....does this make any sense?
Go to the top of the page
 
+
argeedblu
post Jul 27 2004, 06:30 PM
Post #5

UA Forum + Wiki Administrator
Posts: 11,950
From: Sudbury, Ontario, Canada



In the on-click event of your command button you can start with the statement me.visible = false. If there is a chance the user will go back to the form later, it is better to leave it open but not visible. Then when the user clicks a button on another form to return to the first one, just specify that it should be viisble again. That saves loading time between forms.

Glenn
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 02:49 AM