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  

How do I Hide and Show an Access Form?



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2004, 04:45 PM
ABinBoston
external usenet poster
 
Posts: n/a
Default How do I Hide and Show an Access Form?

I have an access form that opens - if there is certain criteria, I want the
form to be hidden, and another form open to allow data to be entered, which
will be updated on the hidden form.

When a user clicks the OK button, I want the 2nd form to close, and the hidden
form to re-open, containing the values from the form that just closed.


Any help is appreciated - AB
  #2  
Old October 2nd, 2004, 05:54 PM
M Davidson
external usenet poster
 
Posts: n/a
Default


AB,

To hide the form change the 'visible' property.

(If the form will have the focus at the execution of the following line...
use this
me.Visible = false

(If the form might not have focus you can declare it implicitly from
somewhere else)
Forms!frmNameOfHiddenForm.Visible = false

To make it reappear tie the same code to another event and change value to
"True"

to refer to the values stored on the hidden from from other forms you'd
place the following code in the Default value property of the object
(probably text box?)

forms!frmNameOfHiddenForm.txtTextBoxName

(frmNameOfHiddenForm is the name of the "Hidden" Form)
(txtTextBoxName is the name of the text box on the HIDDEN form)

The code goes in the default value property of a text box on ANOTHER form.

As far as having the form go visible/hidden in response to criteria; You
can nest the above code in an "If/Then" or "Case" Structure.

I'm new at this too, so I hope the info is what you were looking for. (I
learned how to do the If/Then and case stuff a month ago, and someone on
the newsgroups explained the "invisible form variable holder" thing to me
the other day. It does work well though)

Mike D.




"ABinBoston" wrote in message
...
I have an access form that opens - if there is certain criteria, I want the
form to be hidden, and another form open to allow data to be entered,
which
will be updated on the hidden form.

When a user clicks the OK button, I want the 2nd form to close, and the
hidden
form to re-open, containing the values from the form that just closed.


Any help is appreciated - AB



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 9/28/2004



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide automation instance of Access 2003 Sergey Poberezovskiy General Discussion 7 August 20th, 2004 01:59 AM
Database Window Gone DaveB General Discussion 2 July 29th, 2004 12:24 AM
Hide or show Control Button on Form in Access 97 Pete Sperling Using Forms 8 July 13th, 2004 04:13 PM


All times are GMT +1. The time now is 02:01 AM.


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