not able to select in option group

M

MNJoe

I have an option group with 3 options, Due Date, Work Order Number and Part
ID. I have a report that is sorted according to which option is selected. I
can set the default to 1,2 or 3 and the report works correctly and sorts as
it should according to the selected option. When I run it the form comes up
and the default option is selected BUT, I can not select either of the other
2 options. I have no code in the Before Update, After Update, On Enter, On
Exit, On Click Etc. properties. the only code I have is below.

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

Select Case Forms!open_work_orders_form!optSorted_By

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



When I remove the default setting the MsgBox comes back with an error
'Invalid use of NULL'. Any help is greatly appreciated.

Thanks
 
M

MNJoe

Don't know what problem was. Deleted old form and recreated. 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