Validating input on a screen?

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

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
 
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.selectedindex = -1
messagebox.show("your mess")
exit sub
end select

' the rest of your update code
end sub

Hope it helps

eric
 
Back
Top