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

Disabling Textbox on Continuous Form if field is True

Status
Not open for further replies.

matzos

Programmer
Aug 22, 2001
38
US
I really hope this can be done.

I have a continuous form listing projected quantities ordered by month over a period of time (user defined but usually 12 months). I want to allow users to modify some of the values but I want to lock others (i.e. dates that have already passed) but I have not been able to figure out how to disable a control on jsut one record of a continuous form.

Here is an example of the data. Both values (month & qty) are in textboxes:

JANUARY 100
FEBRUARY 200
MARCH 250
etc.

If we are in February, I want to allow changes to Feb & MArch but not January. How would I disable that control in that record?

I ANXIOUSLY await any advice you can provide. Thanks
 
ensure the forms key preview =yes then in the form key press event

Private Sub Form_KeyPress(KeyAscii As Integer)
If Me.CompanyName = "date" Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If
End Sub
 
That's great. I hadn't thought of that. I can still use that someone in my app but is there a way to disable or format the record's textbox on load so the user knows tehy can't modiy it?
 
if you are using A2k or greater you can use conditional formatting. Access help provides ample explaination
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top