Form keep adding new record when modifying an entry

Discuss the database features

Form keep adding new record when modifying an entry

Postby Ablaknyitókilincs » Wed Aug 02, 2017 3:21 pm

Hey there!

So I just made a form good enough for my needs, and it contains a mainform, which is doing the name entry, and a save button, everything else in sub forms, opening from each other. (need this because the next entry is filtering from the previous entered data).

Basically, this will be an "Enter data only" form, it can not show already entered ones. The working is simple: enter name-> enter customer -> enter location (of the customer) etc.etc. all by list boxes.
Working fine, entering the right data in the right fields so kinda good.

But there is a problem that I can't even understand why even happening.

When I select something, and save the data (refresh button in the subform), it goes well. But (anywhere in the form, even in the first, or last data saved) if i go back to the previous field (basically i'm already in the next sub-form by clicking the "save data" button, and going back to the prev. sub-form (or main form)), and change the entered data from the list it changing the data entered in the table noicly. (and this is how it supposed to work).
BUT!!! when I go to the next list (or subform) to change that too (example: changed the customer, and they have different locations, so need to change that too), after the save button, it creates a new record entry (in the table), containing only that one data entered (location id for example).
I have an "entry ID" named field, which is showing the current entry id, and when this bug or something happens, it shows the original ID, and not the newly created one (with the 1 data only).

First it gave me a bunch of errors, but after I put everything (literally) to "input required = no" it does this. (before changed them it gave me error like this "trying to enter NULL into a non-nullable column")

Any ideas?
Libreoffice 5.3.3.2 on Windows 7
Ablaknyitókilincs
 
Posts: 6
Joined: Mon Jul 31, 2017 2:21 pm

Re: Form keep adding new record when modifying an entry

Postby MTP » Wed Aug 02, 2017 9:47 pm

Can you upload your file, or an example file with any private information removed? If you press the "PostReply" button, under the text box there is an "Upload attachment" form.
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
User avatar
MTP
Volunteer
 
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA

Re: Form keep adding new record when modifying an entry

Postby Ablaknyitókilincs » Thu Aug 03, 2017 2:59 pm

I tried to delete the confidential records, but I can't, because there are too many connections (PK-FK) etc. :\
Libreoffice 5.3.3.2 on Windows 7
Ablaknyitókilincs
 
Posts: 6
Joined: Mon Jul 31, 2017 2:21 pm


Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests