Topic: The record is saved double

Hi. I have a problem. I have two tables. Parent and child. I save the record in  parent table and when I push the button for NEW RECORD in child table, the record in parent Table is saved newly.

Project attached

Thanks you very much.

Post's attachments

Attachment icon TEST.rar 328.4 kb, 340 downloads since 2017-12-06 

Re: The record is saved double

Imagen

Post's attachments

Attachment icon pregunta.png 41.99 kb, 212 downloads since 2017-12-06 

Re: The record is saved double

Hello.


Unfortunately I can't open your project, file is damaged. Try again to attach the file.

Dmitry.

Re: The record is saved double

Ok

Post's attachments

Attachment icon TEST.zip 369.84 kb, 342 downloads since 2017-12-06 

Re: The record is saved double

I have tested, but can't repeat the bug.


Try to remove ComboBox1 from form Textos. No need to place ComboBoxe for parent-child relationship.

Dmitry.

Re: The record is saved double

If I remove ComboBox1 from form Textos the ID of the table DATOS don't save in table Textos (ID_datos)

Re: The record is saved double

ljhurtado wrote:

If I remove ComboBox1 from form Textos the ID of the table DATOS don't save in table Textos (ID_datos)

My Visual Database automatically write id of a parent record for the child record.

Dmitry.

Re: The record is saved double

Sorry. I tried removing the ComboBox but don´t work. I don´t know how do it. If you can explain me any more, I will  it thank you.

Re: The record is saved double

ljhurtado wrote:

Sorry. I tried removing the ComboBox but don´t work. I don´t know how do it. If you can explain me any more, I will  it thank you.


Please open an example:
C:\Users\[USERNAME]\Documents\My Visual DataBase\Examples\Phone Book\


Where one person may belongs many phone numbers (parent-child relationship between tables "person" and "phone").
To do it, no need any script or ComboBox.

Dmitry.

Re: The record is saved double

Ok Thanks

Re: The record is saved double

DriveSoft wrote:
ljhurtado wrote:

If I remove ComboBox1 from form Textos the ID of the table DATOS don't save in table Textos (ID_datos)

My Visual Database automatically write id of a parent record for the child record.

You were right. I found the way.

Thanks