Base - List Box in a Form Grill - Data after update not showed

Hello Guys,
I have learned a lot with your instructions, and I am struggling here. I created a relationship many to many. To do it, I created three tables.
Table 1 - Program ID (Key)
Program Name
Table 2 - ClassID (Key)
NameClass
Table 3 - Program Id (Foreign key)
Class ID (Foreign key)

I created a Form:
Main form: Table 1 (program Id and Program Name).
SubForm: Table 3
Subform has a Table Control.
The table control has a List Box with this command:"SELECT “ClassID” || ‘,’ || “NameClass” FROM “Table2"”
So, when the Form is active, the user choose a program, and, in the table, choose how many classes there is in the program.
It is working good.
The problem is, on the table, when the user is inserting the data, and moves from one record to another record (using the LIst Box), the previous information disappears. Example, line 1, user select class 1, Line 2, select class 3 but the information in line 1 disappear. Line 3, user select class 5, but the information in line 2 disappear.
There is no problem with recording the data because all data are been recorded.
I don`t know how to keep the information in the table when the user is inputting the data.
Thank you for your help.

Hello @VHM,

please upload a sample document so we can try to solve it in there.

Hello @VHM,

I adapted your file a bit; please see if this is what you wanted:

15162224782991636copy.odb

With Regards,
lib

Yeah! It is working very good now. I saw some changes, thank you very much.
I am on a Mac computer, sometimes when I select SQL not work well, that`s why I choose SQL Native. Is that the problem that you fix?
Regards,
Victor

You’re welcome! :smiley:

Please mark this answer as correct by clicking on the checkmark icon to the left.

To be honest, i didn’t inspect the properties before, but i built another from scratch.

Thank you, lib

Hi @librabel,
I got it. Thank you very much!
Have a nice day.
Victor

Here is the file.

Test.odb

Thank you for your help.
Victor