Results 1 to 2 of 2

Thread: How to reset form?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Hi,

    I have a form which has numerous objects on it such as text boxes, check boxes, option boxes, etc..

    After the user has input all the data and made all the selections the user can then hit the "Next" button which saves the data to the database an allows the user to start a new record.

    No objects are bound to the data source so simply moving to a new record will not do anything for me in the way of clearing all the data previously entered by the user.

    So my question is, how can I quickly and easily clear all objects of the user entered data to their original default values? Is this possible?

    any help and examples would be appreciated..

    Dan

  2. #2
    New Member
    Join Date
    Aug 2000
    Posts
    10
    Public Function TextBoxClearAll(FormPrm As Object)
    Dim objTextBox As Control
    For Each objTextBox In FormPrm
    If TypeOf objTextBox Is TextBox Then objTextBox.Text = ""
    Next

    'u can also apply to other controls in for...next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width