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  

Hiding and Un-Hiding Data fields



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2008, 04:13 PM posted to microsoft.public.access.forms
ROL41
external usenet poster
 
Posts: 4
Default 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.
  #2  
Old January 7th, 2008, 04:22 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Hiding and Un-Hiding Data fields

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

  #3  
Old January 7th, 2008, 05:04 PM posted to microsoft.public.access.forms
ROL41
external usenet poster
 
Posts: 4
Default Hiding and Un-Hiding Data fields

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

  #4  
Old January 7th, 2008, 05:07 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Hiding and Un-Hiding Data fields

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

  #5  
Old January 7th, 2008, 07:25 PM posted to microsoft.public.access.forms
ROL41
external usenet poster
 
Posts: 4
Default Hiding and Un-Hiding Data fields

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

  #6  
Old January 7th, 2008, 07:31 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Hiding and Un-Hiding Data fields

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

 




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


All times are GMT +1. The time now is 08:03 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.