Senin, 30 Mei 2011

RE: [MS_AccessPros] A question on Relationships

 

Hello (name?)

The two fields in a relationship must be the same data type and the same
size. You cannot relate a numeric field to a text field, as the data types
are different.

An autonumber is a special kind of long integer, so if your primary key is
an autonumber, the foreign key must be Numeric (Long).

--
Graham [Access MVP]

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
the_extinguisher_pro
Sent: Tuesday, 31 May 2011 10:51
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] A question on Relationships

Lets see if I get this right...
When I make a relationship between tables, I should bound the primary field
on the one side with the foreign key on the many side, right? When I try to
do this an set Referential Integrity, I get a message saying that
"Relationship must be on the same number of fields with the same data
types". Now how would this be posible if the primary key on the one side of
the relationship is the auto number and the foreign key on the many side is
a text field? Am I doing something wrong?

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar