Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two Tables in One Grid
Message
From
05/11/1997 12:28:35
 
 
To
05/11/1997 11:32:52
Jeff Tucker
Mackinac Center For Public Policy
Midland, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00058382
Message ID:
00058408
Views:
29
>Can anyone point me in the right direction with my dilemma below?
>
>OBJECTIVE:
>Combine information from two tables distinctly into one grid. Then send changes to one of the tables.
>
>WHAT I THINK SHOULD HAPPEN:
>User tracks time spent daily on projects. This information is stored in a table called hours.
>User also has a list of favorite projects. This is stored in table called active.
>
>I have a form that allows the user to increment through the days of the years and see their hours in a grid displaying the results of a requeried view that pulls information from the hours table based on date.
>
>When the user decides to edit/add hours they press the edit button. This hides the browsing grid to display the edit grid. This grid should include a list of all the hours already entered for that day, as well as all the list of favorite projects from active.
>
>My idea is to query hours and create table1. Then query active based on userid to create table2. Then select table1 and append from table2. Then query table1 to select distinct the projects and send them to an array. Then popluate the grid with the array. Then in the afterRowColChange Event I will identify if the hours have changed, and if they have, seek it in the hours table and replace or insert it. Then when they click done, delete table1 and table2, hide the edit grid, requery the hours view and show the browsing grid.
>
>Will this work? Is there a better way?

I'm not sure why you want to join the Active table to the Hours table. Do they have a common key?
If so, you can create an updatable view and make the change directly to the view without creating temporary cursors and arrays.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform