Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid & text box woes
Message
 
À
28/04/1997 13:43:13
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00029945
Message ID:
00029951
Vues:
32
>Here's what I want to do, but am having much difficulty.
>
>On a form, I want a text box which lists a company name from my company table. Based on which company name is displayed at the moment (I have a "Next" command button to skip to the next company/record) I want my grid to display the names and assorted info about the employees in a predefined list of positions for that company alone.
>
>My grid is based on a local view which contains the position field from my Position table and Name etc. fields from my Person table. Since these two tables have a many to many relationship (one person can hold more than one position, and one position can be held by more than one person), I had also created a Contacts table which contains PersonID and PositionID fields to link the two tables.
>
>I'm having a problem with my Data Env. only allowing me to make a relation between Company table and "Contacts" view with the "Contacts being the parent since I can't figure out (doesn't look like you can) how to make an index in my "Contact" view which would allow me to make Company the parent.
>
>My questions:
>
>how do I just show the specific company's contacts in the grid, not all in the table/view?
>
>how do I link the grid and the company text box so when I change the company Name, the grid refreshes to show the "new" company's contacts?
>

Sounds like you want a parameterized view for the company, then a requery for the grid view.

>and one last "wish"... I'd love for the user to be able to click the grid headers to reorder the grid, i.e. click the "Position" header to order by position and "Name" header to reorder by employee name. I've seen how to do this with tables and indexes, but not how to do this with views.
>
You can put an index on your view field in the column header click for this...it's just like a cursor temp index.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform