option buttons not showing that they are selected

M

MNJoe

I have an option group. I have checked to make sure they are in a group. When
I run the report the form comes up and I have 3 options "Due Date" "Work
Order Number" and "Part ID". I want the report to sort according to which
option is selected. I tested this and it works. The report comes out
correctly sorted according to which button is selected. My problem is when I
click on the different option butttons it does not put the dot in the button
to show which one is selected.
 
S

Stuart McCall

MNJoe said:
I have an option group. I have checked to make sure they are in a group.
When
I run the report the form comes up and I have 3 options "Due Date" "Work
Order Number" and "Part ID". I want the report to sort according to which
option is selected. I tested this and it works. The report comes out
correctly sorted according to which button is selected. My problem is when
I
click on the different option butttons it does not put the dot in the
button
to show which one is selected.

Place the option buttons in an option group control, then use the group
control's .Value property to detect which was clicked.

Hint: move the option buttons out of the way and place an option group
control via the toolbox (with wizards turned off). Select the option buttons
and cut them to the clipboard. Click once on the group control and paste
them in.
 
M

MNJoe

--
MNJoe


Stuart McCall said:
Place the option buttons in an option group control, then use the group
control's .Value property to detect which was clicked.

I have already checked this by reading other posts and checking to make sure
it is in the option group. I can detect which one is checked in the report
because the report works just fine and sorts according to which option was
selected.
Hint: move the option buttons out of the way and place an option group
control via the toolbox (with wizards turned off). Select the option buttons
and cut them to the clipboard. Click once on the group control and paste
them in.

This is what I did to create the option group to begin with. I can move one
of the option buttons and it expands the option group box out with it.
According to other post this is how to check if they are in the option group.


My problem is when I click on the different option butttons it does not put
the dot in the button to show which one is selected. Selecting or checking
which one was selected is not a problem. That part works fine in my report. I
have selected each one in different random order and ran the report and it
sorts correctly according to which option I selected. On the form where the
Option group is it just doesn't display the DOT in the circle when I click on
one of the option buttons.
 
M

MNJoe

OK, I went in and deleted the old options group and tried to rebuild it and
got the same problem. I can set the default value and the dot appears in the
correct option selection but, it still does not allow me to select either of
the other 2 options. here is my code for the form and the report. The report
does work correctly when I set the default value to 1, 2 or 3.

For the Form

Option Compare Database

Private Sub Exit_Click()
DoCmd.Quit
End Sub

Private Sub Start_Click()
Me.Visible = False
DoCmd.OpenReport "Open_Work_Orders_Report", acViewPreview

End Sub


For the report

Option Compare Database

Private Sub Report_Open(Cancel As Integer)

MsgBox Forms!open_work_orders_form!Sorted_By_Option

Select Case Forms!open_work_orders_form!Sorted_By_Option

Case 1
Me.GroupLevel(0).ControlSource = "DESIRED_WANT_DATE"
Me.Label19.Caption = "Open Work Orders By Due Date"
Case 2
Me.GroupLevel(0).ControlSource = "Base_ID"
Me.Label19.Caption = "Open Work Orders By Work Order Number"
Case 3
Me.GroupLevel(0).ControlSource = "Part_ID"
Me.Label19.Caption = "Open Work Orders By Part ID"
End Select

End Sub

Private Sub Report_Close()

DoCmd.Close acForm, "Open_Work_Orders_Form"

End Sub

and all the events - Before update, After update, On enter, On Exit, On Click
, etc. are all blank. Any ideas are greatly appreciated.

Thanks
 
M

MNJoe

Not sure what the problem was. Deleted the form and recreated from scratch
and did not copy and paste anything from old form. Now it works correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top