Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hellooooooooo I STILL need help with this!!!!
Message
 
À
30/11/2000 09:47:24
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00447316
Message ID:
00447451
Vues:
14
Chuck,

First you are asking us to shoot in the dark on this. You have been given a number of possible solutions to your problem, but apparently none of them have worked for you. You are going to have to do some work here.

The posted code was psuedo code, since I have no idea what the names of your things are or how you have set up your form. I don't know how you have established the relationship between the two tables (is this a one to many relationship set with the SET SKIP TO command).

In my form class there are two properties named lEOF and LBOF to hold the T/F of the logical first or last record. In the refresh of each button I set the enabled property of that button to the proper value according to the lBOF and lEOF properties of the form. Each button's click calls a method of the form to move the pointer, since buttons have no business moving record pointers anyway.

The form methods are GoTop, GoPrevious, GoNext, and GoBottom. Each of these methods moves the record pointer and sets the lEof and lBof properties and calls the form's refresh method. The form's refresh will fire the refresh of the objects contained in the form, but not the refresh of the objects inside any containers in the form. My buttons are NOT in a container, they are independant button objects.

BTW, if you have the set skip set then your skip in person will being actually skipping in the child table.

Below is an example of code that could be in a GoPrevious method of a form class;
(Form class GoPrevious method)
LOCAL lcAlias
* Save current work area
lcAlias = ALIAS()
IF NOT EMPTY( Thisform.DataEnvironment.InitialSelectedAlias )
   * Select the master table alias
   SELECT (Thisform.InitialSelectedAlias)
ELSE
   * No master alias is set so check the current work area for a table
   IF EMPTY(lcAlias)
      * No alias to skip in so get out
      RETURN
   ENDIF
ENDIF

IF BOF()
   * We are at BOF
   Thisform.lBof = .T.
   GO TOP
ELSE
   SKIP -1
   Thisform.lBof = BOF()
   IF Thisform.lBof
      * We moved to BOF
      GO TOP
   ENDIF
ENDIF
Thisform.Refresh()
IF NOT EMPTY( lcAlias )
   SELECT ( lcAlias )
ELSE
   SELECT 0
ENDIF
RETURN
Perhaps this example will allow you to construct your code for your form. Don't try to use this code directly as it is an example only and is not tested or complete. Rather study it and uderstand how it will work, then write your own code.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform