Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Subform Inserts Blank Row

Post Reply
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Subform Inserts Blank Row

Unread post by vario »

I have a simple edit form showing vehicle details with a subform, with 1 blank row, showing odometer readings. When I amend the vehicle details or one of the subform rows and click "Save", the subform inserts a blank row (i.e dates contain "000-00-00", char values contain "" and numbers contain 0). How can I stop this from happening?
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform Inserts Blank Row

Unread post by admin »

Vario,

I can't say exactly but what have you got in the sql for your subform?
Capture.PNG
Steven
You do not have the required permissions to view the files attached to this post.
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Subform Inserts Blank Row

Unread post by vario »

The SQL is pretty basic:

select * from odometer
where odo_vehicle_id = '#id#'
order by odo_start_date

I have subsequently discovered that the blank row is not inserted if I enable the "Delete" checkbox for the subform (which I do not really want to do).
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform Inserts Blank Row

Unread post by admin »

Maybe 'enable' checkboxes but then hide them, like this..

http://forums.nubuilder.cloud/viewtopic.php?f=6&t=7606

Steven
Post Reply