Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Fields

Status
Not open for further replies.

vlingen

Programmer
Aug 4, 2006
31
US
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!
 
Have a look at the NewRecord property.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top