Hello,
I have a parameter form where a user chooses a sort from an option box, values 1-4. I am trying to enter code in the Open Event of the report that will set the OrderBy preoperty at runtime.
Any help would be greatly appreciated.
Thanks,
Al
Hello,
I have a parameter form where a user chooses a sort from an option box, values 1-4. I am trying to enter code in the Open Event of the report that will set the OrderBy preoperty at runtime.
Any help would be greatly appreciated.
Thanks,
Al
Is [Forms]![frmPrintMenuNew]![chooseSo] an unbound control? If not then to what type of field is it bound?
Rural Guy,
Thank you for responding.Yes, it is an unbound control.
I got the following to work:
If Forms!frmPrintMenuNew!chooseSo = "1" Then
Me.OrderBy = "StartDate, LastName"
Me.OrderByOn = True
Else
If Forms!frmPrintMenuNew!chooseSo = "2" Then
Me.OrderBy = "LastName"
Me.OrderByOn = True
Else
If Forms!frmPrintMenuNew!chooseSo = "3" Then
Me.OrderBy = "Program, LastName"
Me.OrderByOn = True
Else
If Forms!frmPrintMenuNew!chooseSo = "4" Then
Me.OrderBy = "Rep, LastName"
Me.OrderByOn = True
End If
End If
End If
End If
Thank you!
Al
Excellent! Thanks for posting back with your success and solution.