Table relationships after splitting (1 Viewer)

naa123

New member
Local time
Today, 12:46
Joined
Oct 30, 2023
Messages
20
Hi,

I have recently split my Access database and am now finding that the relationships in the backend aren't showing as they did before I split the database. Instead, I see what is shown in the screenshot below. Is anybody able to advise what could be happening here or how to split my database so the relationships before splitting are copied across to the back end after splitting?

1704204181351.png


Thanks!
 

jdraw

Super Moderator
Staff member
Local time
Today, 07:46
Joined
Jan 23, 2006
Messages
15,379
Tables and relationships exist only in the BE. Sign on to Backend and see the relationships there.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:46
Joined
Feb 28, 2001
Messages
27,186
I'll add just slightly to jdraw's answer. Relationships exist only where the tables exist. Which is why, if you have TWO back-end files, you cannot have Relational Integrity between two tables that exist in two different back-end files. RI only applies to same-file tables.
 

naa123

New member
Local time
Today, 12:46
Joined
Oct 30, 2023
Messages
20
Thank you both for your reply - the screenshot I posted is what I see on the back-end, and I do only have one back-end file. I created my relationships in my database before splitting, and then split the database once, using the database splitter wizard. I am unsure why I am seeing relationships as in the screenshot above and not how I originally created them.
 

jdraw

Super Moderator
Staff member
Local time
Today, 07:46
Joined
Jan 23, 2006
Messages
15,379
The tables and relationships in your graphic in #1 are default (at least in my view). If you sign on to your back end do you see your relationships?
If you show system tables in your BE and open MSysRelationships, what do you get?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:46
Joined
Oct 29, 2018
Messages
21,473
Did you click on the Show All Relationships button on the Ribbon?
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:46
Joined
Sep 12, 2006
Messages
15,656
Well if you had a single database with the relationships, but then moved the tables, the relationships would not move with them.

The best way is to copy the whole database. Delete the tables from one, delete everything but the tables from the other, and then relink the tables.
 

LarryE

Active member
Local time
Today, 04:46
Joined
Aug 18, 2021
Messages
591
Hi,

I have recently split my Access database and am now finding that the relationships in the backend aren't showing as they did before I split the database. Instead, I see what is shown in the screenshot below. Is anybody able to advise what could be happening here or how to split my database so the relationships before splitting are copied across to the back end after splitting?

View attachment 111697

Thanks!
Open the BE file, delete the default relationships shown and re-establish the relationships you have in the FE. Unfortunately, relationhships don't follow to the BE file when you split. The database will still work anyway, even if you don't re-establish them in the BE file, but it's best if you do.
 

isladogs

MVP / VIP
Local time
Today, 12:46
Joined
Jan 14, 2017
Messages
18,225
Open the BE file, delete the default relationships shown and re-establish the relationships you have in the FE. Unfortunately, relationhships don't follow to the BE file when you split. The database will still work anyway, even if you don't re-establish them in the BE file, but it's best if you do.

I disagree with almost all of that

In fact, relationships can easily be copied to the BE along with the tables
Create a blank database for the BE, then import all tables into the BE after ticking the import Relationships option

1704238168182.png


Alternatively, follow the advice given in post #8 to copy the whole database, the relationships will also be copied.
Then delete the tables from the FE and all except tables from the BE.

You should ALWAYS re-create the relationships and apply referential integrity.
If you don't do so, the database will not "still work anyway" ... at least not continue to work properly as you will, for example, end up with orphaned records
 
Last edited:

LarryE

Active member
Local time
Today, 04:46
Joined
Aug 18, 2021
Messages
591
I disagree with almost all of that

In fact, relationships can easily be copied to the BE along with the tables
Create a blank database for the BE, then import all tables into the BE after ticking the import Relationships option

View attachment 111707

Alternativley, follow the advice given in post #8 to copy the whole database, the relationships will also be copied.
Then delete the tables from the FE and all except tables from the BE.

You should ALWAYS re-create the relationships and apply referential integrity.
If you don't do so, the database will not "still work anyway" ... at least not continue to work properly as you will, for example, end up with orphaned records
After further review and reflection 🤐 (y)
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 12:46
Joined
Sep 12, 2006
Messages
15,656
I disagree with almost all of that

In fact, relationships can easily be copied to the BE along with the tables
Create a blank database for the BE, then import all tables into the BE after ticking the import Relationships option

View attachment 111707

Alternativley, follow the advice given in post #8 to copy the whole database, the relationships will also be copied.
Then delete the tables from the FE and all except tables from the BE.

You should ALWAYS re-create the relationships and apply referential integrity.
If you don't do so, the database will not "still work anyway" ... at least not continue to work properly as you will, for example, end up with orphaned records

It's a while since I've needed to split a database and hadn't really thought about it to be honest. I just casually assumed from the OPs experience that the relationships wouldn't go with the tables, as it were.
 

isladogs

MVP / VIP
Local time
Today, 12:46
Joined
Jan 14, 2017
Messages
18,225
No problem. I just thought it best to clarify the points mentioned.

The relationships are only transferred if you copy the whole database as you suggested or tick the import Relationships checkbox as shown.
By default, Access only transfers database objects but the options allow you to preserve most other database 'features'.
I tick the first checkbox if transferring BE tables & the other 4 when transferring other FE database objects

There is also a third method which can be very useful. Create a database template (.accdt) but that's another story and I don't want to hijack the thread
 

Users who are viewing this thread

Top Bottom