Hide and unhide a form

I have a form, frmStopDailyCounttest in which the user clicks the command 
button cmdAddstats, which, if there's a value being entered which duplicates 
something already in the table, then opens frmDuplicateValues. When 
frmDuplicateValues is opened, what can I do to hide the 
frmStopDailyCounttest, and when it's closed, how can I unhide it?


0
Utf
6/15/2007 8:29:01 PM
access 16762 articles. 3 followers. Follow

4 Replies
855 Views

Similar Articles

[PageSpeed] 1

"Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message 
news:AFF20847-76DC-48BA-9C0F-4EFEEAF1B133@microsoft.com...
>I have a form, frmStopDailyCounttest in which the user clicks the command
> button cmdAddstats, which, if there's a value being entered which 
> duplicates
> something already in the table, then opens frmDuplicateValues. When
> frmDuplicateValues is opened, what can I do to hide the
> frmStopDailyCounttest, and when it's closed, how can I unhide it?

The syntax for showing or hiding a form is:

Forms!frmStopDailyCounttest.Visible = False         ' or True

or:

Forms!frmDuplicateValues.Visible = False         ' or True

Depending upon which form you want to hide or show.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com 


0
Arvin
6/16/2007 1:23:42 AM
That's what I thought, but I guess I must have been putting it in the wrong 
event. I had put it in my On Click event for the primary form 
(frmStopDailyCounttest), but it didn't seem to work (that is, it didn't set 
the form to not visible). 

"Arvin Meyer [MVP]" wrote:

> "Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message 
> news:AFF20847-76DC-48BA-9C0F-4EFEEAF1B133@microsoft.com...
> >I have a form, frmStopDailyCounttest in which the user clicks the command
> > button cmdAddstats, which, if there's a value being entered which 
> > duplicates
> > something already in the table, then opens frmDuplicateValues. When
> > frmDuplicateValues is opened, what can I do to hide the
> > frmStopDailyCounttest, and when it's closed, how can I unhide it?
> 
> The syntax for showing or hiding a form is:
> 
> Forms!frmStopDailyCounttest.Visible = False         ' or True
> 
> or:
> 
> Forms!frmDuplicateValues.Visible = False         ' or True
> 
> Depending upon which form you want to hide or show.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com 
> 
> 
> 
0
Utf
6/16/2007 6:15:00 AM
I just tested the following with a button named cmdOpenForm2 on Form1:

Private Sub cmdOpenForm2_Click()
On Error GoTo Err_cmdOpenForm2_Click
Dim stDocName As String

    DoCmd.OpenForm Form2, , , stLinkCriteria
    Me.Visible = False

Exit_cmdOpenForm2_Click:
    Exit Sub

Err_cmdOpenForm2_Click:
    MsgBox Err.Description
    Resume Exit_cmdOpenForm2_Click

End Sub

Me is used as a shortcut for the current form running the code. It works as 
you require.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message 
news:0FE4EDE1-2802-4C15-9924-A507B2A7BCDE@microsoft.com...
> That's what I thought, but I guess I must have been putting it in the 
> wrong
> event. I had put it in my On Click event for the primary form
> (frmStopDailyCounttest), but it didn't seem to work (that is, it didn't 
> set
> the form to not visible).
>
> "Arvin Meyer [MVP]" wrote:
>
>> "Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message
>> news:AFF20847-76DC-48BA-9C0F-4EFEEAF1B133@microsoft.com...
>> >I have a form, frmStopDailyCounttest in which the user clicks the 
>> >command
>> > button cmdAddstats, which, if there's a value being entered which
>> > duplicates
>> > something already in the table, then opens frmDuplicateValues. When
>> > frmDuplicateValues is opened, what can I do to hide the
>> > frmStopDailyCounttest, and when it's closed, how can I unhide it?
>>
>> The syntax for showing or hiding a form is:
>>
>> Forms!frmStopDailyCounttest.Visible = False         ' or True
>>
>> or:
>>
>> Forms!frmDuplicateValues.Visible = False         ' or True
>>
>> Depending upon which form you want to hide or show.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>>
>> 


0
Arvin
6/18/2007 4:36:57 PM
Thanks, it worked after I put the code in on the line after the 
Docmd.Openform line.

"Arvin Meyer [MVP]" wrote:

> I just tested the following with a button named cmdOpenForm2 on Form1:
> 
> Private Sub cmdOpenForm2_Click()
> On Error GoTo Err_cmdOpenForm2_Click
> Dim stDocName As String
> 
>     DoCmd.OpenForm Form2, , , stLinkCriteria
>     Me.Visible = False
> 
> Exit_cmdOpenForm2_Click:
>     Exit Sub
> 
> Err_cmdOpenForm2_Click:
>     MsgBox Err.Description
>     Resume Exit_cmdOpenForm2_Click
> 
> End Sub
> 
> Me is used as a shortcut for the current form running the code. It works as 
> you require.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
> 
> "Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message 
> news:0FE4EDE1-2802-4C15-9924-A507B2A7BCDE@microsoft.com...
> > That's what I thought, but I guess I must have been putting it in the 
> > wrong
> > event. I had put it in my On Click event for the primary form
> > (frmStopDailyCounttest), but it didn't seem to work (that is, it didn't 
> > set
> > the form to not visible).
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> "Nathan Wolfe" <NathanWolfe@discussions.microsoft.com> wrote in message
> >> news:AFF20847-76DC-48BA-9C0F-4EFEEAF1B133@microsoft.com...
> >> >I have a form, frmStopDailyCounttest in which the user clicks the 
> >> >command
> >> > button cmdAddstats, which, if there's a value being entered which
> >> > duplicates
> >> > something already in the table, then opens frmDuplicateValues. When
> >> > frmDuplicateValues is opened, what can I do to hide the
> >> > frmStopDailyCounttest, and when it's closed, how can I unhide it?
> >>
> >> The syntax for showing or hiding a form is:
> >>
> >> Forms!frmStopDailyCounttest.Visible = False         ' or True
> >>
> >> or:
> >>
> >> Forms!frmDuplicateValues.Visible = False         ' or True
> >>
> >> Depending upon which form you want to hide or show.
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.mvps.org/access
> >> http://www.accessmvp.com
> >>
> >>
> >> 
> 
> 
> 
0
Utf
6/20/2007 10:29:36 PM
Reply:

Similar Artilces:

input data ina pop up form then display onto mai form
Hi I have a subform with transactions on, and can input data directly onto the subform such as the transaction date and amount. I was wandering how you can create a pop up form where you enter the data for the transaction date and amount and automatically displays the information onto the subform. I know how to create the pop up form with the neccessary fields, but i'm not sure how you make the inputted data display on the subform. Thanks in Advance Dosima ...

Iterating through a forms collection and setting variables for nodes
Hi, I have an html form (created by transforming an xml doc with an xsl stylesheet and sent as html within an asp.net page. The doc is a set of user instructions steps. For each of the elements that allow user input (<measurement> and <data_collection>, for example, my xsl turns that into an <input type=text name="the unique name attribute defined in the base xml doc" box in the html form (I would post it, but it's really quite large). The only "changes" the user is allowed to make are via these text boxes. When the user is done, they click a Submit bu...

Hiding "0" values in pivot table
In a worksheet I have a listing of stock records with ItemNumber, Date, StockLocation and NumberOnStock. When I make simple Pivot Table with ItemNumber and StockLocation as rows and select a Sum of "NumberOnStock" I would like to hide rows where the sum is "0". But this does not seem to be possible. Tried to follow the guidelines in the Microsoft article: http://office.microsoft.com/en-us/assistance/HP051998791033.aspx#Hide%20zero%20values%20in%20a%20PivotTable%20report But no luck :-( Mogens You could use conditional formatting on these cells - highlight the cells,...

Checkbox control and forms
I have a database with a few different tables but each table is pretty much the same. The tables have a set of tasks in the cells in Column A (a daily routine to be completed). All other columns in cell 1 have a number 1-31 for each day of the month. I'm trying to create a windows application (I'm using Visual Studio) that as soon as it comes up asks for the users initials, then goes to the main form with a list of tasks that comes from one of the tables (I guess I'll connect using datagrid view for the rows?), beside each task there will be a check box and when the user ...

Hiding formuals in cells question
Hi. I was wondering if there was a way to hide the formulas in cells without protecting the sheet. I am making something for other teachers at my school and I want to hide the formulas so they won't mess anything up on the spreadsheet. Any help would be greatly appreciated. Thanks! Hi not without protecting the sheet but why is this a problem for you? -- Regards Frank Kabel Frankfurt, Germany "JP" <JP@discussions.microsoft.com> schrieb im Newsbeitrag news:ABFE07BF-6087-4E24-814A-03AF8863A633@microsoft.com... > Hi. I was wondering if there was a way to hide the fo...

Query by Form-TJ
I need to do a Query by Form based on multiple selections from combo boxes on a form using Access 2000 I need to bring back the appropriate records in a subform. On Mon, 31 May 2010 07:08:01 -0700, ambushsinger <ambushsinger@discussions.microsoft.com> wrote: Query by Form can't do that. It can only select records in the current form view. After that, you can potentially open a new form with that subset of records in a subform. -Tom. Microsoft Access MVP >I need to do a Query by Form based on multiple selections from combo boxes on >a form using Access 200...

Access Note table in date order, when go to note form, dates are n
Help, I have checked everything and can't find the solution. I have a database that has date visited on the form. I want the last date visited displayed at bottom of form, and prior visits in order above. Anyhow, when I run the note table everything is in proper date order, however, when I put the notes in the note table, and look at it from there, they are NOT in date order. Has anyone had this happen to them? I will still be checking things, but I think I need some help on this quirky one. Thanks. -- Rachel Rollins Access stores records like a barrel of bricks, no...

Using Chart in a Form
Hi, I am trying to put a chart in a form. I use the chart wizard and answer all the questions. While i'm doing this i press on the prview key to see what my output will look like and it looks correct. When i press the finish key i get a chart in my form but it is the wrong one. I get a what seems like a sample chart displaying sales for 3 regions by quarter. No mater what i do, this is the chart the appears. I expect the chart will display correctly in the form view. If you want the design view to look correct, you should open the Row Source in datasheet view and co...

Exch2003 and custom Outlook forms
I have a user who created several forms in their Outlook (Office 2003). Now, they want to share these forms. I need to move the forms into Exchange 2003, running on SBS 2003. Manually copying the forms to a public folder appears to only transfer data, so my question is this: What is the best method for publishing a form from Outlook 2003 into Exchange 2003 Public web folders? Thanks in advance, J Wolfgang Goerlich http://www.outlookcode.com/d/formpub.htm -- Sincerely, D�j� Ak�m�l�f�, MCSE MCSA MCP+I www.akomolafe.com www.iyaburo.com Do you now realize that Today is the Tomorrow you were...

Forms issues
This form has five sections (all on a tab control) 1. materials 2. up 3. down and 4. take up and 5. properties. Each of these sections have parameters associated within the tab.. Section 1 is special because each of the following sections depend and the results yeilded depend on the formulation of materials in section 1. By the way each Formula is composed of maybe 3 different ingrediants at different amounts. So for example A under section 1 could be materials x, y, z at 3g 4g 5g. Section 2 will than keep A and do many trials tweeking one or two processes, if okay Section three will build...

hide my name
When replying to an email or creating one from scratch how do i hide my name in the "from" field...thx fred <fdbjrgetridofthis@wowway.com> wrote: > When replying to an email or creating one from scratch how do i hide > my name in the "from" field...thx Are you saying you want the reply to be anonymous? -- Brian Tillman [MVP-Outlook] no, I don't mind if my email is revealed.. just my name. I have tried by removing it from the "User Name:" field in the email account but it continues to show up. I have also removed from the header informati...

customization form dialog
I need custom the "close opportunity form dialog", this form is visible when you close an opportunity. But i don't found it. somebody, please tell me where i found this form?, or is possible change that? Hi, Miguel, Are you referring to the form that opens if you open an opportunity, click Actions at the top of that form, and then click Close Opportunity? You cannot customize the Close Opportunity (opportunityclose) entity. You can find this entity by doing the following: In the Navigation Pane, click Settings, click Customization, and then click Customize Entities. A lis...

Hiding and Un-Hiding Data fields
I am using a form for people to select data via dropdown menus and then having it run through a query to filter results. Is there a way that I can have certain feilds hidden until a toggle button or something of the like is clicked? Basically I want have three choices of buttons: Year, Quarter, and Month. What I ideally want to happen is when someone selects the button for year, a hidden drop down menu appears where they can then choose from the available years to filter through the query. I would say I am above average with using access, but I have no idea how to hide fields and then...

How do I hide gaps in an Excel 2007 chart?
I have a bar chart that is showing gaps and i don't want them. The select data > hidden and empty cell button does not give an option to hide gaps. I think by default they are hidden but if you even click on this to see what it does the gaps are shown and no way to turn off. Hi, If you hide the actual rows then with the Plot visible cells only setting on the gaps will be removed. In xl2007 the setting is on the Select Data dialog, Hidden/empty cells button. Cheers Andy Waynesch wrote: > I have a bar chart that is showing gaps and i don't want them. The s...

enter key behavior on a form
what property setting activates the next text box when hitting the enter key? right now hitting the enter key submits the form. i only want the enter key to submit the form when the command button is highlited --- Message posted from http://www.ExcelForum.com/ Zygoid, It's the TabIndex property of the control. Set them in ascending order. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Zygoid >" <<Zygoid.113pks@excelforum-nospam.com> wrote in message news:Zygoid.113pks@ex...

Hiding a worksheet #3
I want to hide a worksheet. So, I went to the format menu and the "worksheet" option is grayed out. Why? And, how do I "ungray" it. Hi is your worksheet protected ? -- Regards Frank Kabel Frankfurt, Germany llong wrote: > I want to hide a worksheet. So, I went to the format menu and the > "worksheet" option is grayed out. Why? And, how do I "ungray" it. I think Frank meant to ask about the Workbook--not the worksheet. (Check under Tools|protection|Protect workbook or Unprotect workbook) My question is: Is there another sheet in the w...

chart on the form
Is it possible to have chart controls on the form? I would like to have Excel chart like bare, pie, line chart on the form base on the data in the table. Is it possible to do this? If yes, any controls or activeX controls available for Access? Your information is great appreciated, Use Pivot Chart view and select pivot chart on form properties. Damon "Souris" <Souris@discussions.microsoft.com> wrote in message news:40472F3E-CA90-4D7A-9FBB-75F89078CBD5@microsoft.com... > Is it possible to have chart controls on the form? > > I would like to have Excel chart like...

Hide images when Hiding Rows
I have inserted images into cells, but when I hide the column the images are not hidden with that column, they just get squished between the two cells next to the hidden cell. Is there a setting or way to tie the image to that cell so that it hides/unhides appropriately with the row? -- kurt ------------------------------------------------------------------------ kurt's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35686 View this thread: http://www.excelforum.com/showthread.php?threadid=554712 Kurt You cannot insert an image into a cell. You can overlay ...

cannot see my dialog/forms.
By accident i excluded a file or something from my project, now i dont see my gui anymore,. i try to include the res files, but in the resource viewer i dont see the dialofg box nomore. the appl. still compiles and runs, what do i have to do to get the gui back? thanx N. Karademir Smart Software wrote: > By accident i excluded a file or something from my project, now i dont see > my gui anymore,. > i try to include the res files, but in the resource viewer i dont see the > dialofg box nomore. > the appl. still compiles and runs, > > what do i have to do to get the ...

Non-modal forms and multiple documents
I have a non-modal form over my documents for convenience tools while I am working with it. Essentially a constantly-running macro until the form is closed. It is set to automatically run upon opening the file. The macro/form is based off a template file so that if I send the document to someone else, they won't get the macros, since they don't need it. The problem I am coming across is that if I have documentA loaded, with the macro running, and open up documentB for reference. Instead of running a separate process of the macro, it takes over the macro running with ...

Customizing the New Mail Form
Hello - I have a few quick questions about customizing the new mail form. I have put some user defined fields on the New Mail form which I'm integrating with my application. I'm wondering if there is a standard method of inserting a header in the body of all Emails (such as one's letterhead) and how this is done. Thanks, Mike How long does it usually take for my post to get to google? It seems as if I'm seeing my question below in my Outlook Express (which I just started learning how to use) but it is not yet on google and it has been a few hours. Still wondering...

how to hide an ActiveX control?
hi there i have an ActiveX control, written in C++, which has the OLEMISC_INVISIBLEATRUNTIME flag set, yet when i display the web page it is attached to, i get the familiar "red cross" graphic in the middle of the screen - how can i hide the control so nothing is displayed at all? tia bhu can u set the size of ur control as 1x1 pixels "bhu Boue vidya" <bhuvidya@yahoo.com.au> wrote in message news:1175703214.292931.252210@e65g2000hsc.googlegroups.com... > > hi there > > i have an ActiveX control, written in C++, which has the > OLEMISC_INVISIBLEATR...

Report opens behind form
How do i make a report ontop of my form? I have a switchboard named "Panel" from there i click "Runs Worksheet" and it opens behind the "Panel". Also, I have a Report named "Single Rig Report" when I click on it, it opens ontop, but when i X out of it my Panel is gone?? Im lost... Help! -- Message posted via http://www.accessmonster.com Use this to open a report in the preview mode. DoCmd.OpenReport ,"rptYourReportName", acViewPreview DoCmd.SelectObject acReport,"rptYourReportName", False "stephendeloach via AccessMonste...

Hiding plot Area
I have a formatted output sheet that has a Pie Chart embedded. The data for the pie chart comes from a second sheet using 2 ranges B2:B6 & D2:D6 B2:B6 is always populated and contains labels. What I want to do is, when D2:D6 contains 0 in each cell (or Null), suppress the Pie chart but always show the Legend (which is driven by B2:B6) Many Thanks Adam Adam - All you see of the pie when all values are zero is a single line at the first slice. The legend still appears. To hide the line, double click on one of the wedges and on the Patterns tab, change the Border setting to None. ...

Click on list Item and open a Detail form
Hi Everebody, I need help withe the following: I have a form that has a listbox that gets its data through a query, the list box only show two colums: Company and ProcessDate, also the query retrieves more fields but I set the width of the columns to zero. I also have a command button "CmdViewDetail" that on_click should open a new form that will contain the rest of the information for the record I selected on the list box. How should I do this? I'm not very experienced with vba, could somebody help me? hi Sara, Sara wrote: > I also have a command button "CmdV...