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 make them reappear using a macro or something similar. I 
would appreciate any help. Thanks.
0
Utf
1/7/2008 4:13:02 PM
access.forms 6864 articles. 2 followers. Follow

5 Replies
1322 Views

Similar Articles

[PageSpeed] 30

In design view of your form, set the combo box's Visible property to No.
Then create an option group on your form with the 3 choices.  For example 
let's say the option values of the 3 options are:
Year 1
Quarter 2
Month 3

Then in the After Update event of the option group frame, use a Select Case 
statement to make the combo visible:

    Select Case Me.opgPeriod
        Case 1
            Me.cboYear.Visible = True
        Case 2
            'Do stuff for Quarter
        Case 3
            'Do stuff for Month
    End Select

   Also, you will need to set the combo back to invisible in the form 
Current Event to change options for each record.
    Me.cboYear.Visible = False
-- 
Dave Hargis, Microsoft Access MVP


"ROL41" wrote:

> 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 make them reappear using a macro or something similar. I 
> would appreciate any help. Thanks.
0
Utf
1/7/2008 4:22:01 PM
thanks a lot - im definately heading in the right direction. i have 
everything up until the select case statement. So my combo box is combo12 and 
its titled "fiscal year". when i start entering my statement ive typed the  
Select Case Me.  and then is there something i need to select from the list 
they give me, or am I typing in the name of the combo box? 

thanks for your help

"Klatuu" wrote:

> In design view of your form, set the combo box's Visible property to No.
> Then create an option group on your form with the 3 choices.  For example 
> let's say the option values of the 3 options are:
> Year 1
> Quarter 2
> Month 3
> 
> Then in the After Update event of the option group frame, use a Select Case 
> statement to make the combo visible:
> 
>     Select Case Me.opgPeriod
>         Case 1
>             Me.cboYear.Visible = True
>         Case 2
>             'Do stuff for Quarter
>         Case 3
>             'Do stuff for Month
>     End Select
> 
>    Also, you will need to set the combo back to invisible in the form 
> Current Event to change options for each record.
>     Me.cboYear.Visible = False
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "ROL41" wrote:
> 
> > 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 make them reappear using a macro or something similar. I 
> > would appreciate any help. Thanks.
0
Utf
1/7/2008 5:04:03 PM
Use the name of the combo box. 

    Select Case Me.MyComboBoxName
        Case 1
        .....
-- 
Dave Hargis, Microsoft Access MVP


"ROL41" wrote:

> thanks a lot - im definately heading in the right direction. i have 
> everything up until the select case statement. So my combo box is combo12 and 
> its titled "fiscal year". when i start entering my statement ive typed the  
> Select Case Me.  and then is there something i need to select from the list 
> they give me, or am I typing in the name of the combo box? 
> 
> thanks for your help
> 
> "Klatuu" wrote:
> 
> > In design view of your form, set the combo box's Visible property to No.
> > Then create an option group on your form with the 3 choices.  For example 
> > let's say the option values of the 3 options are:
> > Year 1
> > Quarter 2
> > Month 3
> > 
> > Then in the After Update event of the option group frame, use a Select Case 
> > statement to make the combo visible:
> > 
> >     Select Case Me.opgPeriod
> >         Case 1
> >             Me.cboYear.Visible = True
> >         Case 2
> >             'Do stuff for Quarter
> >         Case 3
> >             'Do stuff for Month
> >     End Select
> > 
> >    Also, you will need to set the combo back to invisible in the form 
> > Current Event to change options for each record.
> >     Me.cboYear.Visible = False
> > -- 
> > Dave Hargis, Microsoft Access MVP
> > 
> > 
> > "ROL41" wrote:
> > 
> > > 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 make them reappear using a macro or something similar. I 
> > > would appreciate any help. Thanks.
0
Utf
1/7/2008 5:07:00 PM
awesome - thank you very much. one more quick question regarding this. is 
there a way for the combo box to go back tonvisible if you select a different 
option from the option group? you know, if someone initially clicks year but 
they actually want month so they click month and the month pops up and the 
year disappears again

thanks again!

"Klatuu" wrote:

> Use the name of the combo box. 
> 
>     Select Case Me.MyComboBoxName
>         Case 1
>         .....
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "ROL41" wrote:
> 
> > thanks a lot - im definately heading in the right direction. i have 
> > everything up until the select case statement. So my combo box is combo12 and 
> > its titled "fiscal year". when i start entering my statement ive typed the  
> > Select Case Me.  and then is there something i need to select from the list 
> > they give me, or am I typing in the name of the combo box? 
> > 
> > thanks for your help
> > 
> > "Klatuu" wrote:
> > 
> > > In design view of your form, set the combo box's Visible property to No.
> > > Then create an option group on your form with the 3 choices.  For example 
> > > let's say the option values of the 3 options are:
> > > Year 1
> > > Quarter 2
> > > Month 3
> > > 
> > > Then in the After Update event of the option group frame, use a Select Case 
> > > statement to make the combo visible:
> > > 
> > >     Select Case Me.opgPeriod
> > >         Case 1
> > >             Me.cboYear.Visible = True
> > >         Case 2
> > >             'Do stuff for Quarter
> > >         Case 3
> > >             'Do stuff for Month
> > >     End Select
> > > 
> > >    Also, you will need to set the combo back to invisible in the form 
> > > Current Event to change options for each record.
> > >     Me.cboYear.Visible = False
> > > -- 
> > > Dave Hargis, Microsoft Access MVP
> > > 
> > > 
> > > "ROL41" wrote:
> > > 
> > > > 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 make them reappear using a macro or something similar. I 
> > > > would appreciate any help. Thanks.
0
Utf
1/7/2008 7:25:01 PM
Sure, in the code for each option, set the visible property as appropriate.
-- 
Dave Hargis, Microsoft Access MVP


"ROL41" wrote:

> awesome - thank you very much. one more quick question regarding this. is 
> there a way for the combo box to go back tonvisible if you select a different 
> option from the option group? you know, if someone initially clicks year but 
> they actually want month so they click month and the month pops up and the 
> year disappears again
> 
> thanks again!
> 
> "Klatuu" wrote:
> 
> > Use the name of the combo box. 
> > 
> >     Select Case Me.MyComboBoxName
> >         Case 1
> >         .....
> > -- 
> > Dave Hargis, Microsoft Access MVP
> > 
> > 
> > "ROL41" wrote:
> > 
> > > thanks a lot - im definately heading in the right direction. i have 
> > > everything up until the select case statement. So my combo box is combo12 and 
> > > its titled "fiscal year". when i start entering my statement ive typed the  
> > > Select Case Me.  and then is there something i need to select from the list 
> > > they give me, or am I typing in the name of the combo box? 
> > > 
> > > thanks for your help
> > > 
> > > "Klatuu" wrote:
> > > 
> > > > In design view of your form, set the combo box's Visible property to No.
> > > > Then create an option group on your form with the 3 choices.  For example 
> > > > let's say the option values of the 3 options are:
> > > > Year 1
> > > > Quarter 2
> > > > Month 3
> > > > 
> > > > Then in the After Update event of the option group frame, use a Select Case 
> > > > statement to make the combo visible:
> > > > 
> > > >     Select Case Me.opgPeriod
> > > >         Case 1
> > > >             Me.cboYear.Visible = True
> > > >         Case 2
> > > >             'Do stuff for Quarter
> > > >         Case 3
> > > >             'Do stuff for Month
> > > >     End Select
> > > > 
> > > >    Also, you will need to set the combo back to invisible in the form 
> > > > Current Event to change options for each record.
> > > >     Me.cboYear.Visible = False
> > > > -- 
> > > > Dave Hargis, Microsoft Access MVP
> > > > 
> > > > 
> > > > "ROL41" wrote:
> > > > 
> > > > > 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 make them reappear using a macro or something similar. I 
> > > > > would appreciate any help. Thanks.
0
Utf
1/7/2008 7:31:01 PM
Reply:

Similar Artilces:

Using custom fields for better email list view.
Hello. I get lots of letters with the same title. I want to group them by topic and sort on the number of letters in the group. I know that I can do this using custom fields but I do not know what query to use to get the number of letters the group. ...

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,...

Making data highlight in bold
Hi all, Thanks for other advice previously. This time I would like to do the following: I have columns of sales revenue data, I would like the rows tha contain the clients details (address, # etc) to highlight in bold whe the sales exceed $30000 in the revenue column. Would I use Conditional formatting for this? Thanks in advance for any help Cheers, Saxte -- Message posted from http://www.ExcelForum.com Hi Saxter! Select the data table Format > Conditional format Formula is: (Example) =$E5>30000 Format button Select format to taste OK OK -- Regards Norman Harker MVP (Excel...

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...

insert zeros in front of cells already filled with data.
If there is data is a column of cells in Excel how do I insert/add additional data (000) in front of each cell? Two ways. If all cells should be the same length, like a check number or an account number, it's called "leading zeroes": http://www.officearticles.com/excel/show_leading_zeroes_in_microsoft_excel.htm If you just want to put 3 zeroes in front of other text, you can use another column to create a formula: ="000"&a1 will give you the contents of A1 preceded by 3 zeroes. ************ Hope it helps! Anne Troy www.OfficeArticles.com "Horizon" <...

Consolication of data
Anyone have a quick way of taking a set of data (x value of time) tha is presented in 10-minute bins (data point every 10-minutes) an consolidate to 30-minute binned data sets (essentially sum every 10-minute bins to each 30-minute bin). Thanks. Mik -- Message posted from http://www.ExcelForum.com My data actually starts in B9, does that changes how things are done i the formula? Mik -- Message posted from http://www.ExcelForum.com My data actually starts in B9, does that changes how things are done i the formula? Mik -- Message posted from http://www.ExcelForum.com Hi Mike Using...

Extending views to related entities data
Hello, We need to be able to display in views all related entities datas, and cascading related entities (parent relation), may be using a syntaxe like related_entity.attribute_name or related_entity.related_entity.attribute name, just as we do in dotnet datasets displayed in datagrids columns. Thanks CS ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the ...

Resizing Data Tables
I have 37 seperate charts that I update every month. I have broken the charts down in to departments and with in the departments, in sections. The big wigs want to have 4 charts on a page, which is what I have done. The problem is that the scale for the sections is 50, because of a few problem areas. But a lot of sections only have 1-10 incidents. With the scale to 50, and with the data labels it makes it hard to read. So I thought about using Data Tables on those that are compact. The problem is that it resizes my chart very small. I would like to resize the data table to get rud of so...

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...

importing bin data
Hello: Since Integration Manager does not offer the ability to import Inventory items along with their bin locationsand quantities, is it worthwhile to try to import bin quantities into GP via Table Import? childofthe1980s Table Import certainly offers that advantage over IM and any other integration product. Take a look at my article on Table Import at http://dynamicsgpblogster.blogspot.com/2008/10/often-overlooked-yet-powerful-table.html for a complete overview. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The D...

Viewing fields in a one to many relationship
I have two tables linked on a one to many relationship table. When I go into the "one" table with the primary key field it has the little plus boxes on the left to view the data from the "many" table with the foreign key. However, when I click on that box, all it shows me is the same data that is in my "one" table. How do I view the fields that are in the "many" table that are not in the "one" table? To put it in perspective, I have an invoice number that is coded to 3 different account numbers. The invoice number is my primary key ...

referencing data from several spreadsheets
I am trying to create a spreadsheet from multiple spreadsheets. Is there any way to program excel so that the next cell in a colum automatically references the next file in a folder ( identical shee and cell)? Example: cell A1 referneces excel spreadsheet entitle [CARTON105.xls]Sheet1'!$C$18 - I would like A2 to refenenc [CARTON106.xls]Sheet1'!$C$18 - and so forth - without having to go i and type each one or click on each individual spreadsheet -- Message posted from http://www.ExcelForum.com Hi Michelle, In F3 of Book3 I used the formula =INDIRECT("[Book"&ROW()-2&...

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...

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...

refrence field on a table
I am trying to have a button on a form where I push it and it opens the form matching a field in the original form. I am starting in "entry" form I click the button "addrun" it then opens the "run" form. on both forms I have a field [formationid] I am trying to have those fields match when I open the "run" form. I tried the following in the where condition of the open form macro. [Forms]![entry]![formation.formationid]=[Forms]![run]![formationid] On Sun, 3 Jun 2007 11:53:01 -0700, Fipp <Fipp@discussions.microsoft.com> wrote: >I am gettin...

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 ...

Sharing data between threads
Hi, I have a problem relating to sharing data between multiple threads. Basically, the problem I'm having is that I have a instance of a class I defined myself. I am spawning a child thread that runs a class function. ie. something like: CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)staticChildThread, (LPVOID)this, 0, &m_dwChildID); //staticChildThread is a member of the class This function alters class members as it is processing. The problem I'm having is that when I try to read these class members from the main thread, the values are unchanged. It is not until the very en...

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...

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. ...

Hiding rows with VBA
Hi all, In my sheet called "insertsheet I have this VBA: (thanks to some users of Google groups) Private Sub Worksheet_Change(ByVal Target As Range) Const nMAX As Long = 10 Dim nRows As Long Application.ScreenUpdating = False With Me With .Range("B8") If Intersect(Target(1), .Cells) Is Nothing Then Exit Sub nRows = .Value End With .Range(.Cells(1, 5), .Cells(1, _ .Columns.Count)).EntireColumn.Hidden = True .Range(Cells(1, 5), .Cells(1, _ ...

Summing up data from various worksheets
I have daily data all on different worksheets (31 in total) and I would like to add up all of the data in these worksheets in a monthly compilation I have so far been using the =sum('jan. 1'!B6, 'jan. 2'!B6 ... etc.) which although is effective is very time consuming is there an easier way to sum up all of the b6 cells without entering them individually? Thanks -- mark_vi_ ------------------------------------------------------------------------ mark_vi_'s Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24507 View this thread: http://www.excelf...

hiding rows
I have data in cells A7:DK394 which all have 0 in them until totals are added in other worksheets which then pullthrough. At the end of the week I have to Hide all rows from A7 to A394 that still have 0 in them as no totals have been added in other sheets so the customer has not posted with us. is there any way excell can recognise the cells that have no data against them and hide them automatically by pressing a button. or if they all start off hidden unhide as data is entered. Hopefully this makes sense many thanks for any help with this as again its to save me lots of...

Data not saved in contact
I enter some info intp the Department field (Business tab)of any contact, save and close it. When I come to open this contact Department field is empty. It happens to all contacts , but only with this field. I have Outlook XP with POP3 account. Thank you Lilia ...

How do I hide email addresses in outgoing mail
Hint: You post your question in the body of the post, not the Subject. Hint 2: Use the BCC field. -- Russ Valentine [MVP-Outlook] "Dennis" <Dennis@discussions.microsoft.com> wrote in message news:B2C2A70C-6C94-4688-8BAF-0A50AC9C142D@microsoft.com... > "Dennis" <Dennis@discussions.microsoft.com> wrote in message news:B2C2A70C-6C94-4688-8BAF-0A50AC9C142D@microsoft.com... > PLEASE write your question in the body of the post and NOT just the subject Have a look here: http://dts-l.net/goodpost.htm As posted here MANY MANY times - put them in the BCC...