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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated field control

Status
Not open for further replies.

lbunch

Programmer
Sep 5, 2006
120
0
0
US
Is there a way to stop a user from adding to values in fields that are months - not allowing them to add but can subtract from values in previous months but can add and subtract to current and forward months. I would think this would be a field lock and key press possibly?

Months are in a subform where users will enter values into fields for months. There needs to be a lock on previous months that just allows the users to subtract not add.

jan1|feb2|mar3|apr4|may5|jun6|jul7|aug8|sep9|oct10|nov11|dec12 6000
3000 2000 1000
 
Well, you could set either the Enabled or Locked property of the controls to false.

I think you should reconsider using field names as "data". It looks unnormalized to me.
 
Ok I can use locked but how - is there a way to lock if user trys to add to amount???
 
Code:
txtMyField.Locked=True

When and where you apply this code is up to your business logic. A typical place would be the Form_Current event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top