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

Ok, I was able to get to the debugger (with a SET STEP ON in the form INIT) and set a watch for ORDER()... It's NOT showing the right index. What controls the index on the form when you have multiple cursors (files)?

I know it's not the DB controls because I did a set order in the DE on another form and that one is right.

Second question regards the index itself, it is a date field. For some reason, I don't know if I read it somewhere or not, but in the DB for the index on the date field I had DTOS(logdate). Is that right or wrong for indexes on dates? If I change it, does it rebuild those indexes for the records in the file currently?

Thanks


>Peter, you were very clear on what you're doing - thanks. Since everything is set up correctly, I'm assuming the Wizard buttons are resetting the index internally. Did you try to step through the code with the debugger?
>
>First load the form and check with the debugger to see if your index is still set to logdate. If so, then click on the Next/Previous and check again. You may have to step through the Wizard code completely to see if it changes the index order.
>
>Also, look at your grid and at the same data in a browse table to see what the order is. Primary ID (if there is one)? Record order? Etc.....
>
>Barbara
>
>>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.
>>
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