Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting data for grid
Message
From
09/11/1997 12:22:54
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Selecting data for grid
Miscellaneous
Thread ID:
00059166
Message ID:
00059166
Views:
59
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 ?
Next
Reply
Map
View

Click here to load this message in the networking platform