Similar Threads:
1.Need Help With Option Group Code
I'm sure this is very easy, but I have no idea how to go about it:
I've created a flexible search page. On this page, the user can
search for records using all of the criteria or only one criteria.
Everything works fine except for the criteria selection from an option
group. The name of this option group is OptionGroup (how creative is
that?), and the three radio buttons given the user three different
possibilities: Option 1-Choose records that are labled as "open".
Option 2- Choose records labled as "closed". Option 3- Choose
overdue records by selecting those records whose tickledates are
previous to today. Here's the code that I wrote up. I know something
is wrong with it since it's not working, so any information would be
greatly appreciated.
'Search by radio button selection, and gets exact match of field.
If no radio button is selected, than loops onto the next criteria
If Not IsNull(Me.OptionGroup) Then
Select Case Me.OptionGroup
Case 1
strWhere = strWhere & " ([Status] = Open) AND "
Case 2
strWhere = strWhere & " ([Status] = Closed) AND "
Case 3
strWhere = strWhere & " ([Status] = Open AND
([TickleDate] < Now())) "
End Select
End If
2.making option groups visible/invisible based on another option group selection
I have a form on which there are 3 option groups. my
first option group determines which of two other options
groups will be visible to to user. I have placed the
following code in the afterupdate event of the first
option group. I know it's wrong. Can someone help me out
with the correct code?
Private Sub Request_Type_Frame_AfterUpdate()
'Hide or Unhide Purpose Frame
'Request Type either 1 or 2
Select Case Request_Type_Frame(Request_Type)
'If Request_Type is 1 Show only Sponsorship frame and hide
Consulting frame
Case 1 Sponsorship_Purpose_Frame.Visible
'...I'm not sure how to make the Consulting_Purpose_Frame
invisible here
Consulting_Purpose_Frame.Visible = False
'If Request_Type is 2 show only Consulting Frame and hide
sponsorship frame
Case 2 Consulting_Purpose_Frame.Visible = true
'...same here for the Sponsorship_Purpose_Frame here
Sponsorship_Purpose_Frame.Visible = False
End Select
End Sub
Your help is much appreciated!!
Emma
3.Option Group within another Option Group?
I want my form to have two "nested" option groups. The first option is
"Existing Employee" and the second option is "New Position". If the first
option is selected, I want additional information to appear that allows the
user to put in a desk location number. If the second option is selected, I
want the user to be able to select the date that the new position has been
budged for (i.e., 2005, 2006, 2007, etc.)
It would be nice if the detail information below each option (desk number,
or date position is budgeted for) doesn't appear unless their relevant
"first" option has been selected. Does that make sense?
I tried an option box with the two options "Existing Employee" and "New
Position", but when I added the dates under "New Position", I didn't know how
to link that to ony the "New Position" Option.
Any help is greatly appreciated!
K -
4.Request Option Group Code Fix & Addition
Hello!
I'm using the following option group code to filter reports by
age......month, quarter, and year. I am looking to do two things here.
First I'm looking for a fix for the "quarterly" code...It is not
working properly and needs to be adjusted.
Secondly I am looking to add options here...primarily the following,
"Last 14 Days"
"Last 30 Days"
"Last 90 Days"
"Last 180 Days"
"Last 365 Days"
What would the appropriate Code be for this? Here is the case code I'm
presently using and want to add options to...
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "CLI_DetailedAttendance_Rep"
Select Case [Frame0]
Case 1 'Current month
stWhere = "Month([Date]) = " & Month(Date) & "And Year([Date])
= " & Year(Date)
Case 2 'Current quarter
stWhere = "DatePart("q", [Date]) = " & DatePart("q", Date)& "
And Year([Date]) = "& Year(Date)
Case 3 'Current year
stWhere = "Year([Date]) = " & Year(Date)
End Select
DoCmd.OpenReport stDocName, acPreview, , stWhere
Many Thanks!
Kevin
5.Option Group Value won't display in Query when code is executed
Hello,
I have an option group stored on a form with 4 choices and am just trying to
usethe value selected in the option group within a query. Simple enough, I
can get the query to work just fine, displaying information based on the
choice made with the option until I execute the query from code. Then it
seems that the option group value is not available or is ignored and does not
work. What I'm noticing is that if I pause the code at the point where the
query is suppose to run and execute the query manually, no information is
displayed (option group value shows blank). However, if I stop the code
completely at that point and then run the query, the information is displayed
just fine.
Can anybody tell me what is going on here? I'm stumped.
Regards,
Ryan
6. option group code
7. Option group coding
8. Visual Basic Code for option groups and Combo box