Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent/child form with a grid and next/prev buttons
Message
 
À
31/07/2001 14:19:58
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00537917
Message ID:
00537925
Vues:
14
>I have a form that I want to use to display a parent/child relationship. The child table has 2 fields displayed in a grid. I have a container class with next/prev buttons. The "next" button contains "skip 1" and "Thisform.Refresh()". I have discovered that I am missing something. If the child table has more than 1 record for the corresponding parent record I have to press the "next" button once for each child record to get to the next parent record. It seems like the button is switching the alias to the parent table prior to issuing the skip 1 command. I know the button code is primitive and needs more code but what code would allow me to operate on the parent table records?

Larry;

I would suggest something like:

Select Parent
skip 1

You should be checking for BOF or EOF as well as an empty table. I would create a method on the form and have the next/previous command buttons call it. Have the buttons enabled/disabled according to if you have records, BOF or EOF.

Tom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform