Results 1 to 9 of 9
  1. #1
    Amen is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Sep 2013
    Posts
    19

    And and Or selection

    Have 2 values in my combo box if i select those 2 values it will skip the next step and move to the other one...



    here is my code, i write this but i got an error
    Code:
    Private Sub womanFacility_AfterUpdate()
     If Me.womanFacility = "No" And"No info" Then
     Me.Case4.Visible = False
      
     Else
     Me.Case4.Visible = True
    
     
    End If
    
    End Sub
    the error is in bold how can i correct that

    thanks in advance

  2. #2
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Assuming that "no" is Item 2 and "No info" is Item 3 in the list, It's roughly like
    Code:
    IF Me.womanFacility.Selected(2) AND Me.womanFacility.Selected(3) Then
    http://social.msdn.microsoft.com/For...orum=accessdev

    You can also loop through all the values looking for the ones you want
    http://stackoverflow.com/questions/1...elect-all-none
    Last edited by Dal Jeanis; 10-23-2013 at 08:09 AM.

  3. #3
    Amen is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Sep 2013
    Posts
    19
    hi Dal Jeanis

    cant i did this..i did but got an error...but when i did the one you, told there is no changes..
    IF Me.womanFacility.Selected="No" AND Me.womanFacility.Selected"No info" Then

    can you share some lights here especially the value 2 and 3

    Many thanks

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    How are you selecting two values in a combobox? Is this a class / school assignment?

    Never mind, it is a cross post

  5. #5
    akhmadahdiyat is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Oct 2013
    Posts
    21
    yeah.. we can't select 2 values in combobox.. I think you means is checkbox..

  6. #6
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I was assuming a multi-select combo box, to make sense of the question.

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Dal Jeanis View Post
    I was assuming a multi-select combo box, to make sense of the question.
    Well, that is something I am unfamiliar with. I will have to go learn about it.

  8. #8
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    It's not much used. One of those cool features that creates real syntax issues. In the underlying reality, the single field represents a hidden table.

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Dal Jeanis View Post
    It's not much used. One of those cool features that creates real syntax issues. In the underlying reality, the single field represents a hidden table.
    I believe I am starting to have flashbacks of suppressed memories... the agony....

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

Similar Threads

  1. Recordlookup and selection
    By mlozano in forum Forms
    Replies: 5
    Last Post: 10-04-2012, 08:50 AM
  2. Selection VBA on Form
    By dualvba in forum Forms
    Replies: 2
    Last Post: 04-19-2012, 07:07 AM
  3. One selection force another selection
    By K. Foster in forum Database Design
    Replies: 4
    Last Post: 02-03-2012, 10:30 PM
  4. cmb box selection
    By dr223 in forum Access
    Replies: 3
    Last Post: 01-13-2012, 09:16 AM
  5. Vendor Selection!!
    By skylitz in forum Access
    Replies: 2
    Last Post: 08-16-2010, 04:09 AM

Tags for this Thread

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