Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting order on a form with NEXT/PREV
Message
From
16/08/1999 11:45:47
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00253926
Message ID:
00254068
Views:
44
Barbara,

I'm a bit lost (because I'm relatively new to VFP) but let me explain what I have...

In the DE I have a file called LOG. Log has a date field in it that I want sorted in date order. There are also 4 other files that have a relationship to LOG via a unique ID # in each file listed in the LOG file (clientid, employeeid, firmid, codeid). The relationship is so the displayed combos show the descriptive as opposed to just the number. In the DE I have the LOG file .ORDER property set for LOGDATE which is an index on the LOG file.

I am not using any framework or additional software tools other than VFP... decided to learn the basics first before I expand to additional utitilies. The only "catch-22" to this is that I am using a copy of the VFP Wizard TextButtons database control class in my form. Currently it is NOT modifed from the VFP Wizard standard - no additional changes effecting NEXT/PREV.

And finally, I have a grid on the second page of the pageframe that displays the LOG detail (including the conversion of the ID's to data) in GRID/LIST format. This grid is setup to NOT allow modifications - just selection - similar to a listbox function.

As I stated, I can't tell what order both the NEXT/PREV or the GRID although they are both identical.

Does that help or make any sense.


>Are you trying to set the order of the main file? If so, then setting it in the DE should work. If it doesn't, then something in the code is changing it. It may be your framework, or anything else. Use the debugger with a break point on Order() or key().
>
>If it's the grid, you must use an index that contains the linking field. However if you want to sort by date or a name inside the linking field use an index "Myid + dtos(InvoiceDate)" This would allow the grid to link to the master table by "Myid" but also sort on the date.
>
>HTH
>Barbara
>
>>How do you set the sorting order on a form that has a database control toolbar on it (Top, Bottom, Next, Prev)? My form has one main file and several associated files linked by relationships. The form has two pages in a pageframe... page1 is the detail, page2 is a grid style list.
>>
>>The primary key on the main file is a unique ID field. I have another REGULAR key setup on a date in the file.
>>
>>I tried modifying the DE for the main file and selecting the date key under the ORDER property for the cursor.
>>
>>That doesn't seem to work. I also attempted to analyze the order that it does list in to no avail... it's not in any sequence I can tell what so ever.
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform