|
 |
access thread: Questions about option groups and radio buttons
Message #1 by simonds@m... on Tue, 27 Nov 2001 19:38:35
|
|
I have an option group with several radio buttons by which, when the user
selects one and then presses a command button associated with the option
group, the appropriate report is opened.
1) Is there a way to add to the set of radio buttons after you have gone
through the Group Wizard? Let's say I have an original group of reports,
but later decide I need to add more. I can't seem to find a way to do
this. (Trying to add individual radio buttons from the toolbox does not
seem to work).
2) Is there a way to change the default background color of the radio
button to something other than white? For instance, I have the background
color of textboxes change to a different color when they have focus, and
then change back to white when they lose focus. I want to do the same for
the radio buttons. Choosing different border styles automatically changes
color, but not to any that I select from the color palette.
e.g.,
Private Sub optAllCCs_GotFocus()
optAllCCs.BorderColor = 16777164
optAllCCs.BorderStyle = "Sunken"
End Sub
_____________________________________
Private Sub optAllCCs_LostFocus()
optAllCCs.BorderColor = vbWhite
optAllCCs.BorderStyle = "Sunken"
End Sub
______________________________________
3) With another group of option boxes, the users select an option for a
rating (e.g., Excellent, Very Good, Good, Fair, Poor). The value
associated with each is a number (e.g., 5, 4, 3, 2, 1) and that number
value is inserted into the table (which has a numeric data type). I then
want to get the average for each of the different entries on that
particular field. Say, for a specific instructor, his three entries for a
certain course may inclue a 5, a 4, and a 3, for an average rating of 4.
This is for a report. I've tried putting the AVG statement as an bound
field in the footer of a report, which itself is based on a query. The
query contains a select average on the field. What I get in the footer is
simply the last rating.
Message #2 by "John Ruff" <papparuff@c...> on Tue, 27 Nov 2001 12:15:08 -0800
|
|
Simon,
1. Instead of using an option group to select which report to print,
why not use either a combobox or a listbox. You can then populate
either one by enumerating through the reports you have. This way you
don't have to keep adding radio buttons to the option group.
2. I know of no way to change the background color of radio buttons.
3. To average the rating for each instruction create an Instructor
Footer.
a. Go to the top line menu and select View > Sorting and
Grouping.
(1) In the Field/Expression box, enter InstructorID or
whatever you use to distinguish each instructor.
(2) You can then add a Group Header but definitely add a
Group Footer and keep the Whole Group Together.
(3) Close the Sorting and Grouping box.
b. You will now see a new header and/or footer for the field you
grouped on.
c. For clarity this footer we created will be called
InstructorID. Add a textbox to the InstructorID Footer,
call it txtRating_Avg.
d. In the txtRating_Avg Control Source property add
=Avg([rating])
You will now get the average rating for each instructor
John Ruff - The Eternal Optimist :-)
-----Original Message-----
From: simonds@m... [mailto:simonds@m...]
Sent: Tuesday, November 27, 2001 7:39 PM
To: Access
Subject: [access] Questions about option groups and radio buttons
I have an option group with several radio buttons by which, when the
user
selects one and then presses a command button associated with the option
group, the appropriate report is opened.
1) Is there a way to add to the set of radio buttons after you have gone
through the Group Wizard? Let's say I have an original group of reports,
but later decide I need to add more. I can't seem to find a way to do
this. (Trying to add individual radio buttons from the toolbox does not
seem to work).
2) Is there a way to change the default background color of the radio
button to something other than white? For instance, I have the
background
color of textboxes change to a different color when they have focus, and
then change back to white when they lose focus. I want to do the same
for
the radio buttons. Choosing different border styles automatically
changes
color, but not to any that I select from the color palette. e.g.,
Private Sub optAllCCs_GotFocus()
optAllCCs.BorderColor = 16777164
optAllCCs.BorderStyle = "Sunken"
End Sub
_____________________________________
Private Sub optAllCCs_LostFocus()
optAllCCs.BorderColor = vbWhite
optAllCCs.BorderStyle = "Sunken"
End Sub
______________________________________
3) With another group of option boxes, the users select an option for a
rating (e.g., Excellent, Very Good, Good, Fair, Poor). The value
associated with each is a number (e.g., 5, 4, 3, 2, 1) and that number
value is inserted into the table (which has a numeric data type). I then
want to get the average for each of the different entries on that
particular field. Say, for a specific instructor, his three entries for
a
certain course may inclue a 5, a 4, and a 3, for an average rating of 4.
This is for a report. I've tried putting the AVG statement as an bound
field in the footer of a report, which itself is based on a query. The
query contains a select average on the field. What I get in the footer
is
simply the last rating.
---
You are currently subscribed to access as: papparuff@c... To
unsubscribe send a blank email to $subst('Email.Unsub')
Read the future with ebooks at B&N
http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&catego
ryid=rn_ebooks
|
|
 |