Disallow new record when order outstanding

Which is why when I first wrote the code I mentioned you should put it in the Before Update event of the form, not the textbox.
 
It is in the Before Update event of the form. There is no code in the textbox events.
 
The form's Before Update event will only fire when you're attempting to move to a different record, whether new or old.

If the Tab key is in the last control. It may be attempting to move onto the next record.
 
That's exactly what it was - I had re-added the product code field after adding an input mask and forgot to change the tab order.

Now I just need to get my outstanding orders query working correctly (instead of duplicating an 'ordered' line when it sees a 'receipt') and I'm all set.

Thank you very much. I really appreciate your time on this.
 
Glad we could help.

Now I just need to get my outstanding orders query working correctly (instead of duplicating an 'ordered' line when it sees a 'receipt') and I'm all set.
You can look into the DISTINCT clause:

http://www.techonthenet.com/sql/distinct.php

If that's not what you're after and are still struggling, then you can always create a new thread with more information on the problem.
 

Users who are viewing this thread

Back
Top Bottom