edit using customer arrange invhist by billdate=d, arrange vwOrdHdr by orderdt=d +
where custno=.cno
Bernie Lis
----- Original Message ----- From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Thursday, March 24, 2005 5:36 PM
Subject: [RBG7-L] - Re: DB Lookup Listbox
Now if sorting the information in a scrolling region was as easy.
I've been playing around trying to use a bit button to sort the region while
the form is open.
Haven't quite found the trick yet.The region is a secondary table.
I always do this using a list box instead of the region, then open a smaller
form when they want to edit one of the rows. It's easy to control the ORDER BY
part of the LOOKUPWHERECLAUSE property. But if you want to do it with the
region try this:
1. Create a single-table view to base the region on. Include an extra column
SortCol to hold the sort value. If the region starts off sorted by last name
create the view like this:
CREATE TEMP VIEW tvwRegionView (SortCol, LastName, FirstName) AS + SELECT LastName, LastName, FirstName
2. Call the form with the ARRANGE BY clause (ARRANGE tvwRegionView BY SortCol).
3. In the EEP code that changes the sort order (to first name, for instance),
do this:
PROPERTY TABLE tvwRegionView CLOSE DROP VIEW tvwRegionView CREATE TEMP VIEW tvwRegionView (SortCol, LastName, FirstName) AS + SELECT LastName, FirstName, FirstName PROPERTY TABLE tvwRegionView OPEN
This should now sort the region by first name. -- Larry
