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

Enable field 1

Status
Not open for further replies.

tshudt

Programmer
May 16, 2005
8
US
I have a subform with fields that are disable. I have code in one of the fields to unlock a field the condition is true. This works but unlocks all the records. I just want to unlock a field for that record. Below is the code I am using now, any help would be greatly appreciated.

Private Sub Time_codes_LostFocus()
If [time codes] = "os" Then
[pwsid #].Enabled = True
End If
End Sub

Thanks
Tim
 
Hi Tim!

In the design view of the form click on the text box for pswid # and then choose Format/Conditional Formating from the menu bar. In the condition use the drop down field the choose Expression is and then in the box type in:

[time codes] <> "os"

For the formating just click the enabled button on the right side and the formating box will grey out. Say okay and that should do it.

hth


Jeff Bridgham
bridgham@purdue.edu
 
How can I add another condition though. I tried to add a second condition but onlu the first one works.

The second condition would work the same as the first. I tried [time codes]<>"os"or"wws" but this does not work.
 
Try this:

[time codes] NOT In ("os", "wws")

hth

Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top