Enforce referential integrity field disabled

Bee

Registered User.
Local time
Today, 09:14
Joined
Aug 1, 2006
Messages
487
Hi,

I opened the relationship window to do the relationships among my tables; however, the check box 'Enforce Referential Integrity' is disabled. I don't understand why is that? And is there anyway to change it?

Also, where should relationships be implemented? is it the FE or BE?
Any help will be very much appreciated.
B
 
Last edited:
Your tables need primary keys defined (should be autonumber in the main table - primary key) and long integer in the other tables (foreign key). If you don't have the keys set up then it won't be able to utilize R.I.
 
Once you get the keys set up as Bob suggested, the relationships are set up in the BackEnd where the tables reside.
 
Hi folks,

I got my PK and FK set up, but I did not see visual representation of the relationships in the relationship-window. Does that matter? Or do they have to be shown in the relationship-window?

Thanks, B
 
You have to "add the tables" to the relationship window and then drag and drop the primary key from one table to it's corresponding foreign key equivalent in the other table(s).
 
You have to "add the tables" to the relationship window and then drag and drop the primary key from one table to it's corresponding foreign key equivalent in the other table(s).
That's what I did. My PK/FK were sorted. But when I drag and drop, a window pops up which does not allow me to tick the enforce referrential integrity box!!
 
The only thing I can think of is that the keys aren't set up properly. Any chance you can compact (Tools > Database Tools > Compact and Repair) and then zip up the file using WinZip or something else and then post it here (has to be <=393Kb AFTER Compacting AND After Zipping)?
 
The only thing I can think of is that the keys aren't set up properly. Any chance you can compact (Tools > Database Tools > Compact and Repair) and then zip up the file using WinZip or something else and then post it here (has to be <=393Kb AFTER Compacting AND After Zipping)?
my file is quite large even after compacting and zipping.
 
The relationships need to be defined in the BACKEND and not the front end. When splitting a database, the relationships window will still show all of the ones that were there when you split it, and you can set limited ones, but they should be set in the backend.
 
Are you editing the relationships in the frontend if so you need to open the backend data file and edit them there.
 
Is there any way to import the relationships work that I have done in the FE to the BE or do I have to delete them in FE and redo everything in the BE?
 
You should be able to go into the backend, do File > Get External Data > Import and there's a button on the bottom right of the dialog where you select your object to import (after you've selected the access file to import from, of course) and when you click it there's a checkbox that says Relationships. You can try making sure it is checked and then just clicking the OK button without selecting any objects, but I suspect that you might need to import something (you can import a form and then delete it) for it to work.
 
You should be able to go into the backend, do File > Get External Data > Import and there's a button on the bottom right of the dialog where you select your object to import (after you've selected the access file to import from, of course) and when you click it there's a checkbox that says Relationships. You can try making sure it is checked and then just clicking the OK button without selecting any objects, but I suspect that you might need to import something (you can import a form and then delete it) for it to work.

Will try that - thanks.
 
You should be able to go into the backend, do File > Get External Data > Import and there's a button on the bottom right of the dialog where you select your object to import (after you've selected the access file to import from, of course) and when you click it there's a checkbox that says Relationships. You can try making sure it is checked and then just clicking the OK button without selecting any objects, but I suspect that you might need to import something (you can import a form and then delete it) for it to work.

No that did not work. Have you tried it before?
 
yes, I have. Maybe a TABLE needs to be imported at the same time.
 

Users who are viewing this thread

Back
Top Bottom