Form Help

E

Erika

I have a form creating that lists a product code and a product description.
When entering data into this form I have people scan a product code. Is
there a way to set up a trigger that will notify me if the product code
listed on the form originally and the scanned product code do not match?
 
P

Pat Hartman

You need to add your own code to the BeforeUpdate event of the control or
the form. I haven't worked with scanners so I don't know if scanner input
will trigger the BeforeUpdate event of the control so if that doesn't work,
use the form level event. You can then cancel the update if the values
don't match. If the field you are scanning into isn't bound, no event will
fire when data is entered so you may need to add a button so that you will
have an event to hang your edit code in.
 
Top