Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

"...with the same data type" error

Discussion in 'Information Technology' started by Bob Richardson, Nov 2, 2005.

  1. Bob Richardson

    Bob Richardson
    Expand Collapse
    Guest

    I'm getting the "Relationship must be on the same number of fields with the
    same data types" error message. The one-to-many link between Student and
    Record is set up.


    Student Record Class

    PERSONID YEAR YEAR
    PERSONID PERSONID
    TIMESLOT

    All fields are type "Number" and I'm trying to set up links between fields
    with the same names. The Keys to these tables are the capitalized words. The
    error msg comes when I try to link YEAR-PERSONID in Record to Class.
     
  2. Loading...


  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    I hate to ask the obvious question, but ARE the data types the same for the
    fields in both tables? You haven't got text in one case, and numeric in the
    other, for instance.

    BTW, Year isn't a good choice for a field name. It's a reserved word in
    Access, and using it for your own purposes can lead to problems.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Bob Richardson" <bobr at whidbey dot com> wrote in message
    news:yLOdnf-Ch-NA4_renZ2dnUVZ_smdnZ2d@whidbeytel.com...
    > I'm getting the "Relationship must be on the same number of fields with

    the
    > same data types" error message. The one-to-many link between Student and
    > Record is set up.
    >
    >
    > Student Record Class
    >
    > PERSONID YEAR YEAR
    > PERSONID PERSONID
    > TIMESLOT
    >
    > All fields are type "Number" and I'm trying to set up links between fields
    > with the same names. The Keys to these tables are the capitalized words.

    The
    > error msg comes when I try to link YEAR-PERSONID in Record to Class.
    >
    >
    >
     
  4. Bob Richardson

    Bob Richardson
    Expand Collapse
    Guest

    Yes, the fields are numeric in every file. The actual field name isn't
    "year" but thanks for reminding me about reserved words.

    A few times, when I've had problems linking a table, it actually helped to
    delete the key field, then re-enter it. It "seemed" that the field had some
    attributes that were preventing me from linking. Once I deleted, and then
    re-entered the field, the former "unseen" attributes were erased and I could
    start anew. Alas, nothing has helped me with the above problem, and I have
    very little hair left :)

    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:OjlqWWv3FHA.2524@TK2MSFTNGP10.phx.gbl...
    >I hate to ask the obvious question, but ARE the data types the same for the
    > fields in both tables? You haven't got text in one case, and numeric in
    > the
    > other, for instance.
    >
    > BTW, Year isn't a good choice for a field name. It's a reserved word in
    > Access, and using it for your own purposes can lead to problems.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Bob Richardson" <bobr at whidbey dot com> wrote in message
    > news:yLOdnf-Ch-NA4_renZ2dnUVZ_smdnZ2d@whidbeytel.com...
    >> I'm getting the "Relationship must be on the same number of fields with

    > the
    >> same data types" error message. The one-to-many link between Student and
    >> Record is set up.
    >>
    >>
    >> Student Record Class
    >>
    >> PERSONID YEAR YEAR
    >> PERSONID PERSONID
    >> TIMESLOT
    >>
    >> All fields are type "Number" and I'm trying to set up links between
    >> fields
    >> with the same names. The Keys to these tables are the capitalized words.

    > The
    >> error msg comes when I try to link YEAR-PERSONID in Record to Class.
    >>
    >>
    >>

    >
    >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    What are the field sizes (Long Integer, Integer, Single, etc.) if they're
    numeric fields?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Bob Richardson" <bobr at whidbey dot com> wrote in message
    news:N_WdnfTQuvzQFfreRVn-rg@whidbeytel.com...
    > Yes, the fields are numeric in every file. The actual field name isn't
    > "year" but thanks for reminding me about reserved words.
    >
    > A few times, when I've had problems linking a table, it actually helped to
    > delete the key field, then re-enter it. It "seemed" that the field had

    some
    > attributes that were preventing me from linking. Once I deleted, and then
    > re-entered the field, the former "unseen" attributes were erased and I

    could
    > start anew. Alas, nothing has helped me with the above problem, and I have
    > very little hair left :)
    >
    > "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:OjlqWWv3FHA.2524@TK2MSFTNGP10.phx.gbl...
    > >I hate to ask the obvious question, but ARE the data types the same for

    the
    > > fields in both tables? You haven't got text in one case, and numeric in
    > > the
    > > other, for instance.
    > >
    > > BTW, Year isn't a good choice for a field name. It's a reserved word in
    > > Access, and using it for your own purposes can lead to problems.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "Bob Richardson" <bobr at whidbey dot com> wrote in message
    > > news:yLOdnf-Ch-NA4_renZ2dnUVZ_smdnZ2d@whidbeytel.com...
    > >> I'm getting the "Relationship must be on the same number of fields with

    > > the
    > >> same data types" error message. The one-to-many link between Student

    and
    > >> Record is set up.
    > >>
    > >>
    > >> Student Record Class
    > >>
    > >> PERSONID YEAR YEAR
    > >> PERSONID PERSONID
    > >> TIMESLOT
    > >>
    > >> All fields are type "Number" and I'm trying to set up links between
    > >> fields
    > >> with the same names. The Keys to these tables are the capitalized

    words.
    > > The
    > >> error msg comes when I try to link YEAR-PERSONID in Record to Class.
    > >>
    > >>
    > >>

    > >
    > >

    >
    >
     
  6. Bob Richardson

    Bob Richardson
    Expand Collapse
    Guest

    Thank you, thank you. That was the problem. On one file they were "double"
    and on the others they were "long integer."

    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:Of3X%23iw3FHA.3292@tk2msftngp13.phx.gbl...
    > What are the field sizes (Long Integer, Integer, Single, etc.) if they're
    > numeric fields?
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Bob Richardson" <bobr at whidbey dot com> wrote in message
    > news:N_WdnfTQuvzQFfreRVn-rg@whidbeytel.com...
    >> Yes, the fields are numeric in every file. The actual field name isn't
    >> "year" but thanks for reminding me about reserved words.
    >>
    >> A few times, when I've had problems linking a table, it actually helped
    >> to
    >> delete the key field, then re-enter it. It "seemed" that the field had

    > some
    >> attributes that were preventing me from linking. Once I deleted, and then
    >> re-entered the field, the former "unseen" attributes were erased and I

    > could
    >> start anew. Alas, nothing has helped me with the above problem, and I
    >> have
    >> very little hair left :)
    >>
    >> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    >> news:OjlqWWv3FHA.2524@TK2MSFTNGP10.phx.gbl...
    >> >I hate to ask the obvious question, but ARE the data types the same for

    > the
    >> > fields in both tables? You haven't got text in one case, and numeric in
    >> > the
    >> > other, for instance.
    >> >
    >> > BTW, Year isn't a good choice for a field name. It's a reserved word in
    >> > Access, and using it for your own purposes can lead to problems.
    >> >
    >> > --
    >> > Doug Steele, Microsoft Access MVP
    >> > http://I.Am/DougSteele
    >> > (no e-mails, please!)
    >> >
    >> >
    >> > "Bob Richardson" <bobr at whidbey dot com> wrote in message
    >> > news:yLOdnf-Ch-NA4_renZ2dnUVZ_smdnZ2d@whidbeytel.com...
    >> >> I'm getting the "Relationship must be on the same number of fields
    >> >> with
    >> > the
    >> >> same data types" error message. The one-to-many link between Student

    > and
    >> >> Record is set up.
    >> >>
    >> >>
    >> >> Student Record Class
    >> >>
    >> >> PERSONID YEAR YEAR
    >> >> PERSONID PERSONID
    >> >> TIMESLOT
    >> >>
    >> >> All fields are type "Number" and I'm trying to set up links between
    >> >> fields
    >> >> with the same names. The Keys to these tables are the capitalized

    > words.
    >> > The
    >> >> error msg comes when I try to link YEAR-PERSONID in Record to Class.
    >> >>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Tue, 1 Nov 2005 07:23:09 -0800, "Bob Richardson" <bobr at whidbey
    dot com> wrote:

    >Yes, the fields are numeric in every file. The actual field name isn't
    >"year" but thanks for reminding me about reserved words.


    Just to suggest another possibility - there are several flavors of
    Number datatype; for instance, an Integer will not link to a Long
    Integer, nor a Long Integer to a Single. Are the fields you're linking
    of the same *specific* Number type?

    John W. Vinson[MVP]
     

Share This Page