>>>Hi everybody,
>>>
>>>I add some textboxes to the form in run-time. The controlsource for these textboxes is left blank. I add one record and type something in each textbox. I save this record and then add another one. All textboxes have the values from the previous record!
>>>
>>>How can I start each time with the clean textboxes?
>>>
>>>Thanks a lot in advance.
>>
>>You reset textbox values to the empty value of corresponding type. If they are not bound, there is nothing which would reset them automatically.
>
>Right, I just figured this. So, I have to loop through page controls and reset value to "" if controlsource is empty.
>
>Uf... :)
You might put the textboxes into container and put the corresponding code to container.Refresh(). Then it will blank them automatically when your page refreshes after you add the new record.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison