Information générale
Catégorie:
Gestionnaire d'écran & Écrans
The parent table in a one to many relation appears to have 'phantom' records. You can see this when you browse the parent table with the relation set. I would recommend that you look into views to handle this type of situation. You could keep the parent table as is and use a paramatized view to access the child table. As you step through the parent, in your 'next' button, issue a requery of the child view with the parent PK as the parameter. The view then returns all child records for the parent.
John
>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?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement