General discussion

Locked

VB - adodc

By whyong ·
i bounded my form to an adodc data control, when i deleted a record and requery, first record will be displayed on my form, now i would like all the textbox on my form to be emptied first(blank screen) after i deleting a record and when i pressed the navigator button on my adodc, my form should display the last record, it is any possible way of doing it??

Please Help!!

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB - adodc

by Miss Kitty In reply to VB - adodc

after your delete, go to a sub to clean out your text boxes like the example below.

Private Sub ClearTextBoxes()
'clear all text boxes
txtName.Text = ""
txtCustid.Text = ""
txtAlphasort.Text = ""
txtStreet.Text = ""
txtCity.Text = ""
txtState.Text = ""
txtZip.Text = ""
txtContact.Text = ""
txtCashOnly.Text = ""
txtFax.Text = ""
txtPhone.Text = ""
txtSalesper.Text = ""
txtTerms.Text = ""
End Sub

Collapse -

VB - adodc

by whyong In reply to VB - adodc

Poster rated this answer

Collapse -

VB - adodc

by Dushy_ant In reply to VB - adodc

This is a very vague kind of a problem and i think there is no solution for this.
But u can workaround this problem by removing the datasource of the text boxes to nothing and then reassigining them when u navigate

Collapse -

VB - adodc

by whyong In reply to VB - adodc

Poster rated this answer

Collapse -

VB - adodc

by carquiza In reply to VB - adodc

Hi whyong,

Try if you could use this:
Dim Control
For Each Control In Form1.Controls
If TypeOf Control Is TextBox Then Control.Text = ""
Next Control

Place this code on the under Private Sub Form_Load() and make sure that your form name is "Form1"
Hope this works for you.

Cheers,

Mel Arquiza
Home Page Design
http://hpd.welcome.to

Collapse -

VB - adodc

by whyong In reply to VB - adodc

Poster rated this answer

Collapse -

VB - adodc

by whyong In reply to VB - adodc

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums