Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting data for grid
Message
De
09/11/1997 12:22:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Selecting data for grid
Divers
Thread ID:
00059166
Message ID:
00059166
Vues:
64
I have the following scenario:
I have a form (lets say Form1) where users can fill in the name, firstname... of a person. To check, if this person already exists, I want to start another form (lets say Form2) and display the "double" persons. I do this with a button in Form1 and the following click-event:

DO FORM .\MASKEN\DOUBLE.SCX WITH ALLTRIM(lcName)

I pass along a parameter with the lastname of the person.
In the init-event of Form2, I have the following code:

PARAMETERS lcDoubleSeek
lcSuche = lcDoubleSeek

If I understand VFP, I now have the lastname in lcSuche.

In Form2, I have a grid and I want it to display the double persons. So I put the following code in the init-event of my grid:

SELECT name, vorname ;
FROM person ;
WHERE ALLTRIM(name) = lcSuche ;
INTO CURSOR cDouble

The grid has the following properties:

RecordSource: cDouble
RecordSourceType: 1-Alias

I hoped that the grid would display the desired data - but it doesn't.
It displays data from another table (one from the dataenvironment for Form1), for Form2 I have defined no DataEnvironment.

What am I making wrong ?? What have I to do that Form2 display the correct data ?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform