Hi Beetle,
If the two fields don't have the same name then Access will create the
relationship as 1 to 1.
This is not a correct statement. A 1 to 1 relationship will be created if
you join two uniquely indexed fields, of compatible data types, together. You
would not want to attempt to join two Autonumber data types, because they
would be fighting against each other. But, you can certainly join an
Autonumber (or Text) field that is uniquely indexed [either by setting it as
a PK, or by indexing the field: Yes (No Duplicates)] to a corresponding
Number/Long Integer (or Text) field that is also uniquely indexed. This will
create the one-to-one relationship. The names assigned to the fields does not
matter, although, one should always avoid using any words that are considered
reserved words when assigning a name to anything in an Access application.
Problem names and reserved words in Access
http://allenbrowne.com/AppIssueBadWord.html
Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
Beetle said:
If I'm reading your post correctly, you are trying to create a relationship
between a field named CustomerID and a field named OrderID. If the two fields
don't have the same name then Access will create the relationship as 1 to 1.
Let's take your example. Table A is the "One" side of the relationship, with
a primary key named CustomerID (let's presume it is an autonumber field),
and table B is the many side with a PK named OrderID (also an autonumber).
You would then add an additional field to table B and name it CustomerID with
a data type of Number (not autonumber). Then in the relationships window you
would drag the CustomerID field from Table A to the CustomerID field in table
B. Since the two fields have the same names, and compatible data types,
Access would create a one to many relationship.
BTW - it may not be the best idea to make OrderDate your primary key.
Typically OrderID would be the PK to keep each record unique. You could have
more than one order with the same order date.
HTH