fiogf49gjkf0d There is an event called AXFomValidate (right click a blank area on form, go to events, choose this one and double-click it. This creates the stub.
In here. Check your conditions. If it fails set AXFormValidate = False - this prevents the form closing. Use myControlName.SetFocus to move back to that control. Use .Colour = adPink (that's not real, you can find those in the color props) to set it to the colour (spelt correctly!) to the one you want. |