P
Phil
I have a report with three subreports. The user runs the
report from a form and based on a choice within an option
group, the user requests sort by either drug name or by
date.
I use the OpenArgs during the OpenReport process to pass
the option group choice, and I have an if/then statement
on the OnOpen event of the subreports to determine what
OpenArgs choice is made and then how to sort it, by drug
or date. So far, so good.
I tried sorting using the Me.OrderBy = "drug name, date"
or "date, drug name", and I get the error "2101 - the
setting you entered isn't valid for this property". OK,
the syntax appears correct, so I looked around and didn't
find much on what I needed to do to change it.
Someone suggested changing the recordsource, so I tried
that, adding an "ORDER BY drug, date" onto the string for
the record source, and the code runs, it just doesn't
complete the sort in the way I ask it (for example, when
I ask it to sort by drung name it doesn't sort by drug
name, asc or desc, it sorts by date every time).
Anyone have any experience with dynamically sorting
subreports?
report from a form and based on a choice within an option
group, the user requests sort by either drug name or by
date.
I use the OpenArgs during the OpenReport process to pass
the option group choice, and I have an if/then statement
on the OnOpen event of the subreports to determine what
OpenArgs choice is made and then how to sort it, by drug
or date. So far, so good.
I tried sorting using the Me.OrderBy = "drug name, date"
or "date, drug name", and I get the error "2101 - the
setting you entered isn't valid for this property". OK,
the syntax appears correct, so I looked around and didn't
find much on what I needed to do to change it.
Someone suggested changing the recordsource, so I tried
that, adding an "ORDER BY drug, date" onto the string for
the record source, and the code runs, it just doesn't
complete the sort in the way I ask it (for example, when
I ask it to sort by drung name it doesn't sort by drug
name, asc or desc, it sorts by date every time).
Anyone have any experience with dynamically sorting
subreports?