Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ordering a report through VBA 1

Status
Not open for further replies.

StuckInTheMiddle

Programmer
Mar 3, 2002
269
US
Does anyone know of a method of setting a reports 'order by' property at run time through VBA for instance? I can do this to Queries through the querydef object, but cant find a similar one for the reports. Please help.
 
You CAN do this in VBA - BUT- you would need to open the report in design mode, set the orderby property and then switch to the preview mode. Unless there is more to it than the ofders, I find it easier to manipulate the querydef object which is the rrecordsource for the report befoer opening the report.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks MichealRed,

This was the exact problem I was having with trying to do this through VBA and the Orderby property. I hadn't considered using the querydef object of the recordsource of the report, but I will now, Thanks again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top