Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2010

    Unanswered: Data Types and Junction Table

    I'm having trouble creating relationships between a junction table and two regular tables, because the primary keys are set as autonumbers and my other fields are short or long text. I keep getting the error message that "relationships must be on the same number of fields with same data types." I thought a PK set to autonumber could form a relationship with a text field? What other way is there to form this relationship?

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    a FK MUST always be of the same datatype (and if relevant the same size) as the PK column it refers. when you define an autonumber column in Access it implements that as a long integer, so you must use the long integer as the datatype in the table that holds the FK.

    a FK must have one row in the referenced (parent) table (the PK) and can have none, one or more columns with that same FK in the referring (child) table
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts