Results 1 to 3 of 3
  1. #1
    xwnoob is offline Advanced Beginner
    Windows Vista Access 2000
    Join Date
    Nov 2011
    Posts
    76

    Enable combo box only if user selects a certain value in 2 other combo box

    Hi,



    So my form has three combo boxes named TypeSecurity,Location,ProjectType. I want to disable projectype in the form unless the user selects two specific values in the other combo boxes which are "Property" in TypeSecurity and "Local" in Location. Only if they select these options then the combo box will appear. How do i do this?

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    One method:

    For combo box "TypeSecurity", use

    Code:
    Private Sub TypeSecurity_AfterUpdate()
       If Me.TypeSecurity = "Property" And Me.Location = "Local" Then
          Me.ProjectType.Enabled = True
       Else
          Me.ProjectType.Enabled = False
       End If
    End Sub

    For combo box "Location", use
    Code:
    Private Sub Location_AfterUpdate()
       If Me.TypeSecurity = "Property" And Me.Location = "Local" Then
          Me.ProjectType.Enabled = True
       Else
          Me.ProjectType.Enabled = False
       End If
    End Sub

  3. #3
    xwnoob is offline Advanced Beginner
    Windows Vista Access 2000
    Join Date
    Nov 2011
    Posts
    76
    Quote Originally Posted by ssanfu View Post
    One method:

    For combo box "TypeSecurity", use

    Code:
    Private Sub TypeSecurity_AfterUpdate()
    If Me.TypeSecurity = "Property" And Me.Location = "Local" Then
    Me.ProjectType.Enabled = True
    Else
    Me.ProjectType.Enabled = False
    End If
    End Sub

    For combo box "Location", use
    Code:
    Private Sub Location_AfterUpdate()
    If Me.TypeSecurity = "Property" And Me.Location = "Local" Then
    Me.ProjectType.Enabled = True
    Else
    Me.ProjectType.Enabled = False
    End If
    End Sub
    Thx it worked

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-07-2011, 10:48 AM
  2. Replies: 1
    Last Post: 02-25-2011, 10:03 AM
  3. User selects pictures for report
    By NISMOJim in forum Reports
    Replies: 1
    Last Post: 10-29-2010, 03:06 AM
  4. Replies: 3
    Last Post: 09-29-2010, 09:31 AM
  5. Force user to enable macros
    By tuna in forum Security
    Replies: 1
    Last Post: 05-09-2010, 04:04 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