Validating input on a screen?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MadCrazyNewbie

    Validating input on a screen?

    Hey Group,

    If I have for Example 3 Testboxs (txtb1, txtb2, txtb3) on my Form and 2
    ComboBox`s (cbob1, cbob2) - All these are bound to a dataset, which new
    feilds can be added to or modifyed from.

    How can i get it so when I click on update, it checks to see if All the
    textboxs and combos have values in? if they don`t throw a message saying
    please check txtb1 for example?

    Ta
    MCN


  • EricJ

    #2
    Re: Validating input on a screen?

    private sub cmdUpdate (...) handles cmdUpdate.click
    select case true
    case txt1.text = ""
    messagebox.show ("your mess")
    exit sub
    case txt2.text = ""
    messagebox.show ("your mess")
    exit sub
    ...
    case cbo1.selectedin dex = -1
    messagebox.show ("your mess")
    exit sub
    end select

    ' the rest of your update code
    end sub

    Hope it helps

    eric

    "MadCrazyNewbie " <test@nospam.co m> wrote in message
    news:eMecncyS25 Z2ny_dSa8jmw@ka roo.co.uk...[color=blue]
    > Hey Group,
    >
    > If I have for Example 3 Testboxs (txtb1, txtb2, txtb3) on my Form and 2
    > ComboBox`s (cbob1, cbob2) - All these are bound to a dataset, which new
    > feilds can be added to or modifyed from.
    >
    > How can i get it so when I click on update, it checks to see if All the
    > textboxs and combos have values in? if they don`t throw a message saying
    > please check txtb1 for example?
    >
    > Ta
    > MCN
    >
    >[/color]


    Comment

    Working...