Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Displays Records Before a Selection is Made
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid Displays Records Before a Selection is Made
Miscellaneous
Thread ID:
00117567
Message ID:
00117567
Views:
57
Some of you may have read some of my posts already re: Grids. I appreciate all the help. Please bear with me as I'm trying to work out all the details, and it's my first time trying to make a grid work. I'm trying to split each detail apart into a separate thread. This should benefit other beginners in VFP by making the info easier to follow.

I'm building a rather simple application wherein I am working with two tables: Vac.dbf (Vacation data) and Prlink.dbf (a master employee file). Vac just contains data like hours earned, hours taken, and employee number. Prlink contains employee number, employee names, and other important info about each employee. In the Data Environment of my form, I have drawn a line between Prlink.employee_nmbr field and an index named "nmbr" in Vac. Vac is INDEXed ON nmbr+DTOS(date), so that the records should appear in ascending date order.

I have created a grid populated with fields from Vac. I have provided a combo box for the user to select an employee from. The combo box RowSource is Prlink.nmbr,fname,lname. In the ValidEvent of the combo box I have the code: ThisForm.Refresh(). Also, I have set the following properties in the Grid: ChildOrder: Nmbr; LinkMaster: Prlink; RelationalExpr: Nmbr. I don't know if I did this right, or even if it was necessary after setting the relation in the DE of the form -- would appreciate verification.

How come, when the form is ran, records are displayed in the Grid even before an employee number is selected out of the combo box?

Thanks,
CWH
Chuck Henry
Next
Reply
Map
View

Click here to load this message in the networking platform