Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

refresh my memory on relationships

Featured Replies

Years ago I built a database using relationships...As I recall it was between 4 database files.

I have not had a use to do this for quite a while.

Currently I have a database file I am using.

I have built a new database lfie with a layout for custom reporting purposes. It wll get the data from my existing database.

From what I remembered I have to have 2 similiar fields in eash database. In this case I have went with a ID Number field. In the databases. These fields are set to do an auto number+1 entry each time a record is created.

All I really want the new Report database to do is flow along with the Maste databaser. In other words, if I create a new record in the Master, a new one is created in the Reporting database. If I delete a record in the Master database, it is deleted in the Report database.

When I first set up the Relationship;

1) from which database do I do this. Do I set up the relationship from the Report database linking to the Master database, or vice versa.

2) I thought that when I first set up the relationship that if I picked the ID Number field from the 2 databases, select the create and delete options, this would do it. But when I create a new record in the Master database, no new record is created in the Report database. If I delete one from the Master, of coursse there is nothing to delete from the the Report database.

What is it that I am missing?

You can't expect database 'B' to follow database 'A' by itself (unless you do some scripting)

But you can add a record to database 'B' related to database 'A' a through a portal.

Create a field in database 'B' which is called "fk_A" (=foreign key of database A).

Create a relationship with your key field in database "A":

Keyfield A = fk_A

Put a portal in your database A based on this relationship and check: "allow the creation of related records" for this portal.

Now everytime you enter data in the portal the key field of 'A' will automatically be entered in the field 'fk_A' in database 'B'. A related record is created.

If you check: 'when deleting a record in this file also delete related records' in the 'define relationships' window. Related records in database 'B' will automatically be deleted if you remove a record from database 'A'.

I hope this makes some sense to you...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.