Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query to a listbox?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Query to a listbox?
Miscellaneous
Thread ID:
00080026
Message ID:
00080026
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform