"...with the same data type" error

  • Thread starter Thread starter Bob Richardson
  • Start date Start date
B

Bob Richardson

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.
 
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.
 
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 :)
 
What are the field sizes (Long Integer, Integer, Single, etc.) if they're
numeric fields?
 
Thank you, thank you. That was the problem. On one file they were "double"
and on the others they were "long integer."
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top