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!

Cannot add to value in previous months

Status
Not open for further replies.

lbunch

Programmer
Sep 5, 2006
120
0
0
US
I have a After_Update event on 12 fields (one for each month as follows). The users will add number values into the fields. Is there way to set the after update to prompt the user that they cannot add to the value in this field if it is a previous month???


If Me.Txtinv10 >= Me.Txtinv10 and is previous month from current month

msgbox 'Value cannot be changed"

is what I am trying to obtain - I believe.


Private Sub txtinv10_AfterUpdate()
Forms!frms19_1.AgedSellOffDate = "11/10/2006"
Me.Requery
Me.txtinv11.SetFocus
End Sub
 
On_Load ...ing the form, why not determine the current month and then disable all the controls on your form you do not want your users to be able to make an entry in?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top