CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Go to child record with FK filled after insert

Print topic Send  topic

Author Message
Teufel
Posted: 01/31/2002, 2:23 AM

Hi!

Right after the INSERTION of a new master record (table Clients) I shall go directly to a child record (table Client Requests) which shall come with its foreign key already filled: that is, the foreign key field which shall already come filled will only be presented to the user (Label), but will not be updateable. So for example:

Table 'Clients' have as primary key 'client_pkey' and another field called 'client_code'.

Table 'Requests' has as primary key 'requests_pkey' and as foreign key linking to field 'client_pkey' the field named 'requests_clients_fkey'.

After inserting a new client, I shall go directly to the insert page of Requests and have field 'requests_clients_fkey' already filled (thus ready for insertion), as well as show to the user the contents of the related 'client_code' field as a Label.

Any help would be greatly appreciated!!!

TIA,
Teufel
Nicole
Posted: 01/31/2002, 4:50 AM

Teufel,
first of all you should pass newly inserted primary key from client record form to requests record form. Refer to gotocode article to find how to do it: http://www.gotocode.com/art.asp?art_id=80&

On requests form add two requests_clients_fkey fields, one of Label type and one of Hidden type (you should add Hidden field in order to include it into generated sql query). Assign them different names on field properties. Then in the Open event of the form get the value of client_pkey field and assign it to both requests_clients_fkey fields.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.