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  

Radio buttons



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2006, 06:48 AM posted to microsoft.public.access.forms
nick
external usenet poster
 
Posts: 642
Default Radio buttons

I am trying to build a form that uses radio buttons. No 1. radio button
opens two text boxs off to the right opens up for "Year" and "Quarter".
N0. 2 radio button opens 2 text box for "Start Date" and "End Date" and
No. 3 Opens up a drop down combination box.
I may have put the cart before the horse but the querys used for all
currently pop up with the request criteria. How does one attach the query to
the form.

  #2  
Old August 25th, 2006, 08:06 AM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Radio buttons

Hi Nick

Open the form in design view andon the form's properties box select the data
column. You need to set the from's "record source". There is a drop down on
this row with a list of available "sources". You should be able to select
your query from this list.

Hope this helps


--
Wayne
Manchester, England.
Not an expert
Enjoy whatever it is you do


"Nick" wrote:

I am trying to build a form that uses radio buttons. No 1. radio button
opens two text boxs off to the right opens up for "Year" and "Quarter".
N0. 2 radio button opens 2 text box for "Start Date" and "End Date" and
No. 3 Opens up a drop down combination box.
I may have put the cart before the horse but the querys used for all
currently pop up with the request criteria. How does one attach the query to
the form.

  #3  
Old August 25th, 2006, 08:15 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Radio buttons

Simplest solution is to use the AfterUpdate event procedure of the option
group to assign the values to the text boxes.

Example:

Private Sub Frame0_AfterUpdate()
Select Case Me.Frame0
Case Me.opt1.OptionValue
Me.[Start Date] = DateSerial(Year(Date), 1,1)
me.[End Date] = DateSerial(Year(Date), 12,31)
Case Me.opt2.OptionValue
Me.[Start Date] = DateSerial(Year(Date), _
3 *(DatePart("q", Date) - 1) + 1, 1)
Me.[End Date] = DateAdd("m", 3, Me.[Start Date]) - 1
End Select
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nick" wrote in message
...
I am trying to build a form that uses radio buttons. No 1. radio button
opens two text boxs off to the right opens up for "Year" and "Quarter".
N0. 2 radio button opens 2 text box for "Start Date" and "End Date" and
No. 3 Opens up a drop down combination box.
I may have put the cart before the horse but the querys used for all
currently pop up with the request criteria. How does one attach the query
to
the form.



  #4  
Old August 25th, 2006, 11:52 PM posted to microsoft.public.access.forms
CurtainMary
external usenet poster
 
Posts: 72
Default Radio buttons

Allen Browne, I am totally impressed by your willingness to help. Just to
look at the various threads is time consuming. Also thank you for your
website with all those tips.
CurtainMary

"Allen Browne" wrote:

Simplest solution is to use the AfterUpdate event procedure of the option
group to assign the values to the text boxes.

Example:

Private Sub Frame0_AfterUpdate()
Select Case Me.Frame0
Case Me.opt1.OptionValue
Me.[Start Date] = DateSerial(Year(Date), 1,1)
me.[End Date] = DateSerial(Year(Date), 12,31)
Case Me.opt2.OptionValue
Me.[Start Date] = DateSerial(Year(Date), _
3 *(DatePart("q", Date) - 1) + 1, 1)
Me.[End Date] = DateAdd("m", 3, Me.[Start Date]) - 1
End Select
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nick" wrote in message
...
I am trying to build a form that uses radio buttons. No 1. radio button
opens two text boxs off to the right opens up for "Year" and "Quarter".
N0. 2 radio button opens 2 text box for "Start Date" and "End Date" and
No. 3 Opens up a drop down combination box.
I may have put the cart before the horse but the querys used for all
currently pop up with the request criteria. How does one attach the query
to
the form.




 




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 11:52 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.