Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two Tables in One Grid
Message
From
05/11/1997 15:10:16
 
 
To
05/11/1997 12:52:11
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:
00058456
Views:
34
>They do have a common key -- empid
>
>I am combining the tables to display a list of favorite project even if hours have not been entered for those favorites yet, because the active table holds the list of favorite projects and the hours table has the list of only those projects who have time worked on the given day. I don't want to add time to the favorite projects in the active table. I want to either add time to existing projects listed in the hours table or I want to insert a new project for that day into the hours table if the user adds time to a task that was not already there.
>
>table structure
>ACTIVE HOURS
>activeid hoursid
>empid empid
>project project
>account account
>activity activity
>groupid groupid
>date (empty) date (specific)
>time (empty) time (hours worked)
>
>I tried making the view but it came out like this:
>activid hoursid empid_a empid_b project_a project_b time_a time_b
>
>Rather than place them distinctly "under" each other. The view placed them "beside" each other.
>
>Maybe there is a better way to make this work. Any ideas?

I don't know if you need the Active table, since it seem that all the fields appear in the Hours table.

I will assume that the Active table contain the list of all available project and the Hours table will contain the actual entered hours for each project.

Active:
ActiveID
ProjectName

Hours:
HoursID
ActiveID
EmpID
Account
Activity
GroupID
Date
Time

I would put a grid based on a view for the first form with "New", "Modify" and "Delete" command buttons.
The view will be a join between the two tables on Active.ActiveID = Hours.ActiveID

The second form will contain a field for each item (not a grid). You could put a list box for the project, so the user can select the project from a list.
By clicking OK on this form, the information will be saved in the updatable view.

Tell me if I'm beside the track or if my suggestion make sense.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform