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
|
|||
|
|||
Table Connection
Dear experts,
Here I have a very important question. Once I connect table to table sometimes it shows 1 to 1. In the same time I need it 1 to many. How come that shows one to one? What is the technique in it? How it works? Besides this I have another question. For example table1 and table2. In query I can see field size as : integer and long integer. What is integer and what is long integer. I dont know this. Please explain. I am a top intrested student in msaccess who is studying more than 7 years. In table1 in which situation I have to mention field size integer and long integer? If so what I have to mention in table2 ? Would appreciate your response. |
#2
|
|||
|
|||
Table Connection
A1. One-to-one
When you create a relationship between 2 tables, Access looks at how the fields are indexed. If it's the primary key (or a unique index), it knows that you can only have that value in ONE record, so it determines that's the ONE side of the relationship. If the field on the other side is uniquely indexes as well, you can have that value in only ONE record there as well. Hence it reports it as a one-to-one relationship. If this happens when you don't expect it, you need to change the index on the table that should be in the MANY side of the relation, so it is not uniquely indexed. A2. Integer vs Long. In Access an Integer means a whole number up to a maximum of 32767 (i.e. signed, 16-bit.) A Long Integer is a signed 32-bit number, so handles any whole number up to 2 billion. These days, I suggest you use Long Integer unless you have a special reason to use the smaller type. If you want to create a relationship between tables, you need to use the same type on both sides. The default AutoNumber is a long integer, so a foreign key that relates back to an AutoNumber needs to be a Long Integer. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "ak" wrote in message ... Dear experts, Here I have a very important question. Once I connect table to table sometimes it shows 1 to 1. In the same time I need it 1 to many. How come that shows one to one? What is the technique in it? How it works? Besides this I have another question. For example table1 and table2. In query I can see field size as : integer and long integer. What is integer and what is long integer. I dont know this. Please explain. I am a top intrested student in msaccess who is studying more than 7 years. In table1 in which situation I have to mention field size integer and long integer? If so what I have to mention in table2 ? Would appreciate your response. |
Thread Tools | |
Display Modes | |
|
|