dbTalk Databases Forums  

Sorting with a calculated field

comp.databases.paradox comp.databases.paradox


Discuss Sorting with a calculated field in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Jeanette
 
Posts: n/a

Default Re: Sorting with a calculated field - 11-01-2006 , 02:29 PM







I have tried sorting in OPEN, CAN DEPART, CAN ARRIVE, INIT - no luck. But
if I place the code in OPEN or INIT and open the form again the data is sorted.


I think I have to sort to a diffrent table


"Fred Z" <fredzcalgary (AT) hotmail (DOT) com> wrote:
Quote:
Jeanette wrote:
The have a table - CashFlow that has setGenFilter on ContractNo.
I have a form with a table frame of CashFlow that has a formula using
the
StreetCode column on a form.
I added another column named StreetSort that has the same data as StreetCode
- however the code below does not sort the table

Why???

cashTbl.attach("CashFlow.DB")
sort cashTbl
on "ContractNo", "StreetSort"
endSort

Try testing the attach with if not cashTbl.attach("CashFlow.DB") then
msginfo("I","oops") endif. "This method fails if the value of tableName
is not valid (for example: the table name doesn't match the table type,
or conflicts with the database name)."

Also, your Arrive built in method placement for the code may conflict
with the tableframe built in Open method. Open may have opened your
tableframe and the table got locked somehow.



Reply With Quote
  #12  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Sorting with a calculated field - 11-03-2006 , 09:17 AM







Jeanette,

If a table is in a form's datamodel, then you can't recreate it once the
form is opened. You can Sort the table onto itself in the Init method &
Open method before the doDefault. But, once you execute doDefault, that
table is in use.

Typically, I've sorted to a new table, emptied the DM table, then reloaded
it with the sorted table.

HTH.

Jim Moseley

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.