
Signature
Dave Hargis, Microsoft Access MVP
> I run the form and enter values into the text box in question. With this code
> nothing happens, it accepts whatever value I enter without the messagebox
[quoted text clipped - 32 lines]
> > > > > rule and message on the table, but I want to leave a back door to enter lower
> > > > > numbers.
Yes, I entered the code for the procedure event Before Update for the text
box in question. The form is bound to a local table in my database, and this
text box is bound to one of the fields in that table. When that didn't work,
I tried to enter the code into different events (after update, lost focus),
but it didn't work there either. The only time I get anything to work even
partially is to create a macro that has a messagebox action and then a
gotocontrol action and put that macro in the lost focus event or after update
event. In those cases, the messagebox fires, but not the gotocontrol.

Signature
Joer
> You have the code in the Before Update event of the text box you are entering
> the number in?
[quoted text clipped - 37 lines]
> > > > > > rule and message on the table, but I want to leave a back door to enter lower
> > > > > > numbers.
Klatuu - 13 May 2008 14:59 GMT
Joer,
I really don't understand your problem. The code I originally posted is the
standard way to validate data entered in a control. Why it is not firing the
message box, I don't know.

Signature
Dave Hargis, Microsoft Access MVP
> Yes, I entered the code for the procedure event Before Update for the text
> box in question. The form is bound to a local table in my database, and this
[quoted text clipped - 46 lines]
> > > > > > > rule and message on the table, but I want to leave a back door to enter lower
> > > > > > > numbers.
Joer - 16 May 2008 16:34 GMT
I created a new form that duplicates the original one that I've been working
with. I entered your code in the before update event on the text box in
question and it works. I then went back to my original form and tried it
again and it will not work on that form. I've no clue why. Maybe because the
original database was created with Access 97 and converted to the 2000
format? But the new form is still in the 2000 format, so I've no clue! Thank
you for your time.

Signature
Joer
> Joer,
>
[quoted text clipped - 52 lines]
> > > > > > > > rule and message on the table, but I want to leave a back door to enter lower
> > > > > > > > numbers.
Klatuu - 16 May 2008 16:49 GMT
Great. Sounds like the original form had some corruption going on. I was
sort of beginning to suspect that.
Thanks for letting me know.

Signature
Dave Hargis, Microsoft Access MVP
> I created a new form that duplicates the original one that I've been working
> with. I entered your code in the before update event on the text box in
[quoted text clipped - 60 lines]
> > > > > > > > > rule and message on the table, but I want to leave a back door to enter lower
> > > > > > > > > numbers.