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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extract form sortorder and apply to report

Status
Not open for further replies.

xentaur

Programmer
Nov 17, 2003
35
AU
Have developed a DB (Access 2000) which one user in my network seems to be using contrary to every other user. Much of it has to do with being able to sort reports according to any field within them.

The report data is presented in a form and, with the right-click menu, users can sort by any field. report is printed with a command button.

Is there a way to determine the form sort-order and then apply that sort order to the printed report via vba?

Cheers


xentaur.
 
A little digging and I've found it myself.

declare public string variable
Public prorder as string

In form OnCurrent set event procedure:
prorder=me.orderby

in report OnOpen set event procedure:
me.orderby=prorder

I love it when a plan comes together.

Cheers

Xentaur.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top