Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018


    Quote Originally Posted by koncreat View Post

    Is_hold_tag_required - this is a yes or no field
    If Is_Hold_Tag_Required = "Yes" Then

    indicates that Is_Hold_Tag_Required is defined as a Text Field, with the literal value of Yes being entered there!

    With Is_hold_tag_required being a Yes/No Field, instead of

    If Is_Hold_Tag_Required = "Yes" Then

    it needs to be

    If Me.Is_Hold_Tag_Required = Yes Then

    or, better still

    If Me.Is_Hold_Tag_Required = -1 Then

    Notice the Me. in front of Is_Hold_Tag_Required. This indicates to Access that you're referring to the data contained in the Control, whereas simply using Is_Hold_Tag_Required, without the Me., refers to the Control object itself.

    Sometimes Access will forgive the missing Me. but not always, so it's better, IMHO, to use it.

    Linq ;0)>

  2. #17
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The following code
    Code:
    Private Sub Form_Current()
        If Is_Hold_Tag_Required = "Yes" Then
            Responsible_QE.Enabled = True
            If Responsible_QE.ListIndex < 0 Then
                Command330.Enabled = True
            Else
                Command330.Enabled = False
            End If
        Else
            Responsible_QE.Enabled = False
        End If
    End Sub
    can/could be written to

    Code:
    Private Sub Form_Current()
        Me.Responsible_QE.Enabled = (Me.Is_Hold_Tag_Required = Yes)  '<<-- instead of YES, I would use TRUE, since this is a Boolean field
        Me.Command330.Enabled = (Me.Responsible_QE.ListIndex < 0)
    End Sub

    Just sayin.....


Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Enabling and Disabling Buttons on a Form.
    By Slurry Pumper in forum Forms
    Replies: 10
    Last Post: 11-14-2016, 10:07 AM
  2. Replies: 4
    Last Post: 10-25-2013, 06:48 AM
  3. Enabling and disabling fields
    By SgtSaunders69 in forum Programming
    Replies: 9
    Last Post: 12-27-2011, 06:11 PM
  4. Disabling and Enabling subforms
    By vt800c in forum Programming
    Replies: 3
    Last Post: 05-24-2011, 07:37 AM
  5. Enabling Disabling Combo Boxes from Values
    By vdanelia in forum Forms
    Replies: 3
    Last Post: 02-04-2011, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums