I should be able to figure this one out, but it's late:
I'm trying to sort a report by two fields. I can do it easily if I
hard-code the fields. However, I want to get user input and store the
input in variables, which would then be used in the OrderBy method.
Right now it looks like this and is not working:
rptMember.OrderBy = strfield1, strfield2
What am I doing wrong? Any help would be greatly appreciated.
Thank you,
tim
Steve Schapel - 28 Jun 2006 20:18 GMT
Tim,
Never done this, so not sure, but you could try like this...
rptMember.OrderBy = strfield1 & "," & strfield2
I also think it is important what event you are using for this. I think
once the report is open it is too late to miodify data properties. I
would try on the Open event of the report itself, in which case...
Me.OrderBy = strfield1 & "," & strfield2

Signature
Steve Schapel, Microsoft Access MVP
> I should be able to figure this one out, but it's late:
>
[quoted text clipped - 10 lines]
>
> tim