I'm working on a very simple inventory form. A single form 10 fields, no sub-forms or tabs. I have some code set up that when the user moves between records on the form, it performs some data validation. It checks if the inventory item is found on an Order. If it is, I want to "Lock" certain fields so they cannot be changed and if not, I change the "Lock" to false.
I have the locking set up on the Form Detail On Paint. This works fine until I want to Add a new record. The form is still running the On Paint code and then errors out when there isn't an inventory ItemId to lookup. I was hoping to set up a flag somehow to not perform the OnPaint validation when in "Add mode".
Does anyone have some ideas?
Thanks!
I have the locking set up on the Form Detail On Paint. This works fine until I want to Add a new record. The form is still running the On Paint code and then errors out when there isn't an inventory ItemId to lookup. I was hoping to set up a flag somehow to not perform the OnPaint validation when in "Add mode".
Does anyone have some ideas?
Thanks!