Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Relationship in Forms
Message
From
24/05/1998 10:17:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/05/1998 03:45:36
Tan Gay Cheong
Cybercomp Computer Services
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00101477
Message ID:
00101503
Views:
36
>I have a table1 and table2.
>
>table1 and table2 have the same primary key. If i set relation with these two key, how can I make them work in the form.
>
>For example, table1 is the customer data table which have "customer" as the primary key, and in table2 in the invoice table, which also have the "customer" primary key.
>
>How can I make table2 to have a new "customer"(same as table1's primary key) value, when every time I append a new record in table1?
>
>Where should I put the codes and what is it?
>
>Thank you. I am using VFP5.0 and is a novice.
Tan,
In database designer, set table2's primary key default value as table1.pkey and relate them there. Whenever you design a new form with these tables, open dataenironment of form and put both. Relation would be automatically 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