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