Hello,
I have a clients tables, and a contacts table.
On the clients form, I added a subform containing all the contacts associated with that client.
I do NOT want to be able to delete any contacts for database integrity. So, on the subform I set "deleteable" to NO.
However, I do want to be able to add a contact from this subform, so I set BLANK ROWS = 1.
It appears that anytime I do a save on this form, it adds a blank record to the contacts database with the client ID.
Is this some setting I did wrong, or is there a way around this?
This is on Version 2.7
Thanks,
- Andre
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
subform adds "blank" new record when marked deletable = no
-
- Posts: 66
- Joined: Wed Apr 04, 2012 11:34 pm
Re: subform adds "blank" new record when marked deletable =
Andre,
Can you show us the sql used in the subform?
Steven
Can you show us the sql used in the subform?
Steven
-
- Posts: 66
- Joined: Wed Apr 04, 2012 11:34 pm
Re: subform adds "blank" new record when marked deletable =
the SQL statement in the subform is:
Table: contact
Primary Key: cn_id
Foreign Key: cn_cl_id
SELECT * FROM contact WHERE cn_cl_id = '#id#'
Blank rows = 1
If I change DELETEABLE = NO and go into a Client record and save it (say I changed something in the client, not the subform) it will create a new blank record (with the Client ID in the foreign key) in the contact table.
changing DELETEABLE = YES (So the check boxes with the "DELETE" column at the end of the blank row) shows up, the problem does not occur.
Am I doing something wrong, is this a bug, or is this a limitation?
Table: contact
Primary Key: cn_id
Foreign Key: cn_cl_id
SELECT * FROM contact WHERE cn_cl_id = '#id#'
Blank rows = 1
If I change DELETEABLE = NO and go into a Client record and save it (say I changed something in the client, not the subform) it will create a new blank record (with the Client ID in the foreign key) in the contact table.
changing DELETEABLE = YES (So the check boxes with the "DELETE" column at the end of the blank row) shows up, the problem does not occur.
Am I doing something wrong, is this a bug, or is this a limitation?