Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query to a listbox?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Query to a listbox?
Divers
Thread ID:
00080026
Message ID:
00080026
Vues:
61
I am creating a form that interfaces with about 8 tables. One problem I'm running across, is that I need to have a listbox that will display the result of a many-to-many comparison based upon the value of one of the textboxes on the form. I'm teaching myself Foxpro, and I'm stuck.

Using, as an example, a book inventory program - there are three tables to be considered: Books, Books_Authors, and Authors. They compromise a many-to-many relationship. Books have a unique Book_ID and authors have a unique Author_ID. Those two fields make up the Books_Authors junction table.

On the form, the record in question will have its Book_ID in the appropriate textbox. I have a listbox that I would like to display all the authors that apply to that book (two columns, FirstName and LastName). I know how to set the listbox to a query file as a resource - but I'm lost as to composing the query.

How can I input in the Book_ID displayed on the form, and use it to search for all authors that match - returning the values to the listbox?



Daniel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform