Form Properties Based on a field value

stacy505

New member
Local time
Today, 16:05
Joined
Sep 4, 2014
Messages
5
On my form ECOs
When my text box RELNUM is > 0 I want form properties AllowEdits set to FALSE.
When RELNUM is null I want form properties AllowEdits set to TRUE.

This must be possible, but not entirely sure where to start.
Since I can scroll through records in this form I'm thinking I have to put an event in ON LOAD, bbut beyond that I'm at a lost.

Any help would be appreciated.
 
You are me hero. I've been reading all kinds of post today and couldn't figure this out. and your link made it crystal clear. I changed ot on On Current instead On Load, but it works perfectly! Thanks again. S
 
Glad it helped you too!
 
pbaldy, I'm getting a 'compile error : method or data member not found' when using your code suggestion both on a _change() event . I also tried _afterupdate() event with same erro. Can you see what is wrong? cboMode is a combo box with choices of : Readonly, edit, insert. This code is not allow edits when readonly is chosen from the combo. I am trying to not allow edits on the subform called 'subenvTest'. Any help is appreciated.

Private Sub CboMode_Change()
If Me.CboMode = "Readonly" Then
Me.subENVTest.AllowEdits = False
Else
Me.subENVTest.AllowEdits = True

End If
End Sub
 
Paul,,, This helps IMMENSELY for the future too... Let me try applying this to my code.
thanks
 
No problem, I've had that saved as a favorite for a long time.
 
Paul, I am SO HAPPY

I needed:
Me!subENVTest.Form.AllowEdits = False

instead of:
Me.subENVTest.AllowEdits = False

There are So many variations,, I can't thank you enough , not sure I'd ever figure this out without the link you sent.
 

Users who are viewing this thread

Back
Top Bottom