General discussion

  • Creator
    Topic
  • #2322459

    VB – adodc

    Locked

    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!!

All Comments

  • Author
    Replies
    • #3405525

      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

      • #3405802

        VB – adodc

        by whyong ·

        In reply to VB – adodc

        Poster rated this answer

    • #3405409

      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

      • #3405803

        VB – adodc

        by whyong ·

        In reply to VB – adodc

        Poster rated this answer

    • #3407421

      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

      • #3406002

        VB – adodc

        by whyong ·

        In reply to VB – adodc

        Poster rated this answer

    • #3416032

      VB – adodc

      by whyong ·

      In reply to VB – adodc

      This question was closed by the author

Viewing 3 reply threads