OrderBy with multiple fields

T

Tim Otero

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
 
S

Steve Schapel

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
 

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