I am opening a report using criteria from a combo box. The user wants to be able to choose the sort order of the report. I added two radio buttons, one named optName and the other optNubmer. How do I work the choice into my open report code pasted below?
[This message has been edited by BukHix (edited 02-08-2002).]
Code:
Private Sub cmdOpenIndex_Click()
Dim strReptCriteria
Dim bProcOk As Boolean
bProcOk = True
strReptCriteria = txtReptCriteria
If IsNull(Me.txtReptCriteria) Then
MsgBox "You must select a criteria!", vbExclamation, "Error"
txtReptCriteria.SetFocus
bProcOk = False
End If
If bProcOk Then
DoCmd.OpenReport "CloseOutIndex", acViewPreview, , _
"[ReportCaption] = '" & strReptCriteria & "'"
End If
[This message has been edited by BukHix (edited 02-08-2002).]