How to error check EditBox?

  • Thread starter Thread starter count
  • Start date Start date
C

count

Hi,
I tried this in a form that's called from another:
Private AgeBox_Change() 'AgeBox is a TextBox control
If val(AgeBox) > 150 then
AgeBox.SetFocus
End If
And it gladly ignores my intention to halt user in the box to correct the
number.
I also tried that logic within other events: Enter, BeforeUpdate,
AfterUpdate, Exit. No luck.
I really need to error check for numeric, for no garbage and within range.
How is it done?
BTW: I prefer, if possible, not to use message boxes with bad news - just
plain halting in a box will do.
Thanks
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top