Proper Event Trigger for QCing Entry

mbreu996

Registered User.
Local time
Today, 01:26
Joined
Feb 19, 2010
Messages
49
Need help with proper event trigger, and potentially proper refresh.

Data entry form with subform in datasheet view. The lab results are entered on the subform in the field "result". The result field is text, in order to accommodate characters like "<0.002". I want to guard against entries that do not have preceding 0's such as "<.002", ".002", and even a lone ".". I know enough about string manipulation to achieve what I want in terms of that part of the code, but I am at loss in terms of using the correct event trigger. I tried using after update and on dirty but those don't seem to giving me the results I desire.

What I desire is for the user to be prompted as soon as they make the improper entry (my code uses a msgbox to show them what the improper entry was and what it was changed to). Probably at the moment they leave the cell. The only issue I see with that is the bottom of datasheet - the user might make the last result entry and not actually exit out of that cell (additions disabled). Maybe this doesn't matter depending on what event trigger is suggested.

Maybe my approach is off base - but I don't think the built in validation will do the trick, maybe it will. I don't think I would be able to change the entry using the validation rule approach.

Thanks for the help!
 
Last edited:
Try the KeyPress event. There, you can check the ASCII code of the character being typed.
 

Users who are viewing this thread

Back
Top Bottom