Results 1 to 5 of 5
  1. #1
    GaioAugusto is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    4

    Impossible to select any value from the ComboBox

    I need to synchronize combo boxes, so that when I select an item in the first combo box, the selection limits


    the choices in the second combo box. I need to requery when I click in the second combo box (in the event was clicked for first) so I use the following code:


    Private Sub Dettaglio_MouseDown


    Posizione1 = Me.CurrentRecord
    DoCmd.Requery
    DoCmd.GoToRecord , , acGoTo, Posizione1
    DoCmd.GoToControl "Dettaglio"
    Me!Dettaglio = Me!Dettaglio.ItemData(0)


    End Sub


    The problem is that using this code become impossible select from the second combobox menu. Remain selectioned and blocked the first item. If I don't use the previous code become possible make a selection.

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Use after update event.
    See http://www.baldyweb.com/CascadingCombo.htm

  3. #3
    GaioAugusto is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    4
    Quote Originally Posted by amrut View Post
    Use after update event.
    See http://www.baldyweb.com/CascadingCombo.htm
    Same issue with update event, and same issue with this code too:

    Private Sub Dettaglio_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)


    Select Case [Forms]![Form]![Argomento]
    Case "Capacità Razziali"
    [Forms]![Form]![Dettaglio].RowSource = "Q Capacità Razziali"
    Case "Dungeon Master"
    [Forms]![Form]![Dettaglio].RowSource = "Dungeon Master"
    End Select
    Me!Dettaglio = Me!Dettaglio.ItemData(0)

    End Sub

    Thanks in advance

  4. #4
    GaioAugusto is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    4
    Quote Originally Posted by amrut View Post
    Use after update event.
    See http://www.baldyweb.com/CascadingCombo.htm
    Same issue with update event.

  5. #5
    GaioAugusto is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    4
    Solved: using GotFocus event instead of MouseDown event and using this simple code:

    Private Sub Dettaglio_GotFocus()


    Me.Dettaglio.Requery


    End Sub

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

Similar Threads

  1. ComboBox, select null?
    By offie in forum Queries
    Replies: 2
    Last Post: 07-19-2013, 06:27 AM
  2. Use combobox to select form to open
    By gemadan96 in forum Forms
    Replies: 11
    Last Post: 11-15-2012, 01:42 PM
  3. Form ComboBox Filter - Select ALL records
    By jhrBanker in forum Forms
    Replies: 2
    Last Post: 08-02-2012, 08:57 AM
  4. 0 divided by 0 = impossible..
    By LanieB in forum Queries
    Replies: 13
    Last Post: 01-03-2012, 05:24 PM
  5. How to select ComboBox list in Run time
    By sdondeti in forum Forms
    Replies: 2
    Last Post: 06-20-2011, 10:21 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