Oddity in text box 'before update' event

F

Fredrated

Accounting has used a MS wizard to create a simple fixed-assets database,
then asked me to modify it to better suit their purposes.

At the top of the main form, either me or the wizard (this was started a
while ago) added a text box labeled "Depreciation through".

The user options on the main form, "Edit asset categoties", "Print asset
report" etc. are accessed by either clicking a command button to the left, or
a label (with an on-click event) to the right of the button.

The wierd thing is, if the user changes the value in the "Depreciation
through" box, then clicks a command button on the form, the "Before Update"
event of the text box fires first, and I can inspect it's value before they
use it. On the other hand, if they enter a value into the text box, then
click the label next to the command button, the 'on-click' event of the label
fires first and they get their menu action, before the 'before update' event
of the text box. Thus, they could enter an inappropriate date into the text
box and run a report before I can tell them they put a bad value into the
"Depreciation through" box!

Normally I would just disable the labels, but the CFO has bad eyesite, and
the big print in the labels gives him something he can see.

Any ideas on how to keep bad dates out of the 'depreciation through' box?

Thanks in advance for any help.

Fred
 

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

Top