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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |