Secret Squirrel said:
They are both bound fields set to date/time format and they do have date
values in them. I tested it by putting the material due date greater than
the
due date to trigger the msgbox but I don't get the msgbox. This code fires
in
the after update event of the material due date control.
So you entered a date in DueDate, and then typed a later date into
MaterialDueDate, and you didn't get the message box? If that's true, the
next thing to do would be to find out if the event procedure is executing at
all. Set a breakpoint in that procedure -- on the Sub header line, or maybe
on the If statement -- and then try entering a value in the MaterialDueDate
control. Is the breakpoint triggered? If so, step through the code from
there, checking the values of the controls, and see what happens. If the
breakpoint doesn't fire, then make sure that (a) the MaterialDueDate
control's AfterUpdate property is set to "[Event Procedure]", and (b) VBA
code is enabled in this database. Does other VBA code work?
One thing to note: if you are assigning a value MaterialDueDate using code
(or, I think, a macro), the control's AfterUpdate event won't fire. Could
that be what's going on?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)