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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|