Skip to content
Advertisement

“Missing columns in relationship” when creating table

I have tried to create three tables(CUSTOMERS, VEHICLES and RENTALS), the third table (RENTALS) has foreign keys referring to the two primary keys of the first two tables (CUSTOMERS and RENTALS). When creating this third table I get an error Missing columns in relationship(Rel=CUSTOMERS[[]] -> RENTALS[[]])

Here’s my codes

and here’s the error enter image description here

Your help will be very much appreciated, I have looked around but found nothing that helps.

Advertisement

Answer

In Access, an AutoNumber field (DDL: AUTOINCREMENT or COUNTER) is a “Long Integer”.

In UCanAccess DDL, INTEGER creates an “Integer” (16-bit) field and LONG creates a “Long Integer” (32-bit) field.

You need to declare your foreign key columns as LONG, not INTEGER.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement