Results 1 to 3 of 3

Thread: Make Empty fields > 0

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Make Empty fields > 0

    How can I check for empty fields after pressing a button??

    I have code which makes all Fields value 0....so it should be possible to set all fields which have no data 0.

    VB Code:
    1. Sub CmdZero_Click()
    2. Dim MyTextBox As Control
    3. For Each MyTextBox In Me.Controls
    4. If TypeOf MyTextBox Is TextBox Then MyTextBox.Text = "0"
    5. Next
    6. End Sub

  2. #2
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    VB Code:
    1. Sub CmdZero_Click()
    2. Dim MyTextBox As Control
    3. For Each MyTextBox In Me.Controls
    4. If TypeOf MyTextBox Is TextBox  Then
    5.   If MyTextBox.Text = "" Then MyTextBox.Text = "0"
    6. End If
    7. Next
    8. End Sub

    like that?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Thanks

    Yeah found it out myself aswell...posted my question to earlie...

    Thanks anyways!

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