A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatic fil the foreign key



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2007, 08:40 AM posted to microsoft.public.access.forms
Frank Situmorang[_2_]
external usenet poster
 
Posts: 340
Default Automatic fil the foreign key

Hello,

I tried to undestand Contact data base, sample in the MS Access. I can not
found on which form the Contact id filled, because I see the sampel it was
field.

Can anyone tell me?

With many thanks

--
H. Frank Situmorang
  #2  
Old January 1st, 2008, 12:54 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Automatic fil the foreign key

Hello Frank,

I don't have a copy of Northwind on my machine, so I am going to guess that
ContactID is an autonumber field. You can verify this by opening the
Contacts table in design view and look at its Data Type. If it is an
autonumber field it is populated automatically whenever a new record is
entered on the Contacts form. If there is a subform on the Contacts form,
and it contains ContactID and is the LinkChildFields and LinkMasterFields
value, then it also is populated automatically when a new record on the
subform is entered.

God Bless,

Mark A. Sam


"Frank Situmorang" wrote in message
...
Hello,

I tried to undestand Contact data base, sample in the MS Access. I can not
found on which form the Contact id filled, because I see the sampel it was
field.

Can anyone tell me?

With many thanks

--
H. Frank Situmorang



  #3  
Old January 1st, 2008, 01:49 PM posted to microsoft.public.access.forms
Frank Situmorang[_2_]
external usenet poster
 
Posts: 340
Default Automatic fil the foreign key

Thanks Mark for your kind repsonse. Waht do you mean by linked child fields
and linked master fields. Is'nt it because the referenctial integrity is
tikced?

Can you explain more the qonsequencies of referenctial integrity is ticked.

--
H. Frank Situmorang


"Mark A. Sam" wrote:

Hello Frank,

I don't have a copy of Northwind on my machine, so I am going to guess that
ContactID is an autonumber field. You can verify this by opening the
Contacts table in design view and look at its Data Type. If it is an
autonumber field it is populated automatically whenever a new record is
entered on the Contacts form. If there is a subform on the Contacts form,
and it contains ContactID and is the LinkChildFields and LinkMasterFields
value, then it also is populated automatically when a new record on the
subform is entered.

God Bless,

Mark A. Sam


"Frank Situmorang" wrote in message
...
Hello,

I tried to undestand Contact data base, sample in the MS Access. I can not
found on which form the Contact id filled, because I see the sampel it was
field.

Can anyone tell me?

With many thanks

--
H. Frank Situmorang




  #4  
Old January 1st, 2008, 02:23 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Automatic fil the foreign key

Two of the properties on a Subform control are LinkChildFields and
LinkMasterFields. This tells Access which fields relate the underlying
tables of the main form and subform. In your case it would be ContactID.
If the properties each say ContactID then Access will automatically populate
ContactID in the subform. Referential integrity doesn't do this.
Referential integrity will keep the relationship between the main table and
subtable intact, so that it can deleted the subtable records the
corresponding records are deleted in the main table or update the linking
field when the main table field is updated, to keep them in sync.

The relation between a main table and subtable can be established either
automatically using LinkChildFields and LinkMasterFields propertied of a
subform, by programming, or manually by opening the tables and typing the
values into the fields.



"Frank Situmorang" wrote in message
...
Thanks Mark for your kind repsonse. Waht do you mean by linked child
fields
and linked master fields. Is'nt it because the referenctial integrity is
tikced?

Can you explain more the qonsequencies of referenctial integrity is
ticked.

--
H. Frank Situmorang


"Mark A. Sam" wrote:

Hello Frank,

I don't have a copy of Northwind on my machine, so I am going to guess
that
ContactID is an autonumber field. You can verify this by opening the
Contacts table in design view and look at its Data Type. If it is an
autonumber field it is populated automatically whenever a new record is
entered on the Contacts form. If there is a subform on the Contacts
form,
and it contains ContactID and is the LinkChildFields and LinkMasterFields
value, then it also is populated automatically when a new record on the
subform is entered.

God Bless,

Mark A. Sam


"Frank Situmorang" wrote in message
...
Hello,

I tried to undestand Contact data base, sample in the MS Access. I can
not
found on which form the Contact id filled, because I see the sampel it
was
field.

Can anyone tell me?

With many thanks

--
H. Frank Situmorang






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.