Are Txt1 and txt2 unbound textboxes? I am asking that because usually only unbound controls need to be populated manually. As well, unbound controls on a continuous form usually do not work as expected. The best way to populate controls on continuous forms is to bind them to fields in the form's record source.
I have used the following code to convert a column of data to a grid in a table then used that table to power a continuous form. If the population of the data is done manually like this, then saving the values from the form has to be done manually as well.
rsO!SGCode = SGCode
For Y = 1 To TotCol - 1
rsO("Salary" & Right("0" & Y, 2)) = Salary(Y)
Of course if txt01 and txt02 are in the header or footer then you can simply populate them using code like this:
for y = 1 to 2
me.Controls("txt" & Format(x, "00")) = rsO("txt" & Right("0" & Y, 2))