This is a little bit of work but seems to be a usable work around. I added a integer column called cidorder to the sales table
Create view (VWtest) with data set that I want and order I want (Company Table and Sales Table)
CREATE VIEW `VWtest` AS + SELECT * FROM Company t1,Sales t2 WHERE t2.Cid = t+ 1.Cid AND t2.ManCid = .vmancid AND t2.RepCid = .vrepcid AND + t2.SDate = .vsdate AND t2.SCid IS NULL ORDER BY t1.cname ASC
PROJECT TEMP tmporder FROM vwtest USING ALL
AUTONUM cidorder IN tmporder USING 1 1 NUM
UPDATE sales SET cidorder = t2.cidorder FROM sales t1, tmporder t2 WHERE t1.sid = t2.sid (Sid is PK in sales)
EDIT USING edsales3 WHERE sid IN (SELECT sid FROM vwtest) ORDER BY cidorder
edsales3 is single table form with region
At 04:32 PM 6/18/2003 -0400, you wrote:
At 12:40 PM 6/18/2003 -0700, Gary Winzeler wrote:
Using Windows 6.5++ Ver 1.866xRT03 Is there any way to order rows in a single table form with a region based on a column in another table.
Here is what I have:
Company table cid integer - Unique id cname (company name text 30) ...
Sales table cid integer ...
I need to edit data in the sales table only - Edit form is single table based on the sales table and I would like to order by cname, I would rather not add the column to the sales table.
Gary,
Yes, you CAN!
01. Copy that form and use the Company as Master Table.
02. In Form Designer, Add Sales table as Slave table and then set Sales as your current table.
Create a region with everything based on Sales table.
Note: You don't need to locate any field or anything related to Company table, etc. on that form.
03. EDIT USING SalesData + ARRANGE Sales BY OrderDate ASC + ORDER BY CName
That will give the results you need.
All records will be sorted by CName (table=Company) along with the OrderDate (table=Sales).
or simply:
EDIT USING SalesData ORDER BY CName
Hope that helps!
Very Best R:egards,
Razzak.

