CarlosB Posted April 2, 2007 Posted April 2, 2007 I'm having a problem with a relationship. I have a layout with some info about hotels and a button that goes to the another layout that shows pictures of that hotel. I made a relationship between them with an ID field, and it work perfectly beside one thing. If I create a new record in the hotel table, it doesn't create a new one in the picture table, even though I selected "Allow creation of records in this table via this relationship". Does anybody know why this won't work? Thanks in advance
Inky Phil Posted April 2, 2007 Posted April 2, 2007 Selecting the 'allow creation' box is quite misleading for beginners. There are lots of people who think it does what you thought it did. Unfortunately that is not the case. What it means is that you can create records in a portal and it allows a blank line for that purpose if the box is checked. What you need to do is script a new record creation so that it creates the child record at the same time. The script would be along these lines (assuming that you start from the layout for the hotel (not the pictures) and also assuming that your main records are set up for an auto enter keyID field Create new record Set variable to record ID go to a layout that is set up to show records from the related file Create new record. Set key_id field to your variable Go to original layout attach this script to a button on your main layout and it will create related records in both tables HTH Phil
Recommended Posts
This topic is 6702 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now