Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textboxes in a form not cleared

Status
Not open for further replies.

SitesMasstec

Programmer
Sep 26, 2010
526
Brasil
Hello colleagues!

After saving the contents I typed in many textboxes in a form, I terminate the program (thisform.release, etc)

When I execute the program again some data I typed before appear in the form (as if I have typed them again).

I think I have the data typed cleaned putting the following command on the Form1 Init event:
thisform.Pageframe1.Page1.txtRNO01.Value=SPACE(10)
thisform.Pageframe1.Page1.txtRNO02.Value=SPACE(10)
thisform.Pageframe1.Page1.txtRNO03.Value=SPACE(10)
...

Isn't the above correct, I mean, putting those commands in the Init event?

Thank you.


Thank you,
SitesMasstec
 
Looks like you still didn't understand thread184-1766175

You have set the controlsources, there is no magic going on, but the controls are bound to data.
If you don't want data to appear don't set the controlsources of form controls.

Bye, Olaf.
 
Yes, Olaf I had review that thread but the data are not bound to any table or cursor. The data are saved in a table just after I click on the "Save" button on the Form.

I have just solved it by putting:
Code:
thisform.Pageframe1.Page1.txtRNO01.Value=SPACE(10)
thisform.Pageframe1.Page1.txtRNO02.Value=SPACE(10)
thisform.Pageframe1.Page1.txtRNO03.Value=SPACE(10)
...
in the Destroy event of the form! And the data were cleared as I needed.


Thank you,
SitesMasstec
 
Well, if you want to blank a record: BLANK
Or if you wan to enter a new empty record APPEND BLANK.
But no, don't work on two dozens of controls values.

What do you really want? Now your form is empty, but everytime you exit the form, you delete the data you just entered, you empty the row.
You don't need a table nor any data binding, if you don't want to store what you enter.

Bye, Olaf.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top