Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid with a SET RELATION TO not working
Message
From
20/03/2002 05:45:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00634689
Message ID:
00634839
Views:
19
>I have a grid connected to a table, TIMESHEET. TIMESHEET is related into 2 tables.
>
>select Timesheet
>set relation to project into project, project+task into tasks
>
>GRID
>column 1 is Timesheet.project
>column 2 is Project.descrip
>column 3 is Timesheet.task
>column 4 is Tasks.descrip
>
>What I want is when I type in a project in column1, project descrip appears, and column4 is blank until I type in a task into column3.
>
>The project.descrip (column 3) is working great, but as soon as I type in a project into column1, the task descrip comes up with a descrip that is not related to the project.
>
>Any ideas?

Frederick,
Directly using tasks.descrip and Project.descrip as controlsources doesn't sound to be feasible (they are needed readonly there, aren't they).
If so try changing controlsources to something like :
column2.Controlsource = ;
  [(iif(seek(TimeSheet.Project,'Project','PrjFKTag'),]+;
  [Project.descrip,''))] 
column4.controlsource = ;
  [(iif(seek(Timesheet.Project+TimeSheet.Task,'Tasks','PrjFKTag'),]+;
  [Tasks.descrip,''))]
This approach doesn't need any relations set.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform