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

Blank Field Issue 2

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
I feel like I should know the answer to my problem but it is not working. Please see code below. What I am
wanting to do is: When I click a yes/no checkbox on my form (ChangeStandardHours) and the (ProjectNbr)
text box is Blank, then I want the (Ctl1_8ton_pending_approval) CheckBox to be enabled. It starts off non
enabled. I can get this to work if the (ProjectNbr) CheckBox is not Blank but not when it is Blank it will not work.
Can someone point out what I am doing wrong and how to fix it?

Code:
If Me.ChangeStandardHours = True And Me.ProjectNbr = Blank Then
Me.Ctl1_8ton_pending_approval.Enabled = True
End If
 
If Me.ChangeStandardHours = True And IsNull(Me.ProjectNbr) Then


or

If Me.ChangeStandardHours = True And Nz(Me.ProjectNbr,"") = "" Then

except for the case where you have some variable named Blank...

HTH



[pipe]
Daniel Vlas
Systems Consultant

 
Code:
Me!Ctl1_8ton_pending_approval.Enabled = (Me!ChangeStandardHours And (Trim(Me!ProjectNbr & "") = ""))

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top