Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2007
    Posts
    72

    Unanswered: Set combo to null/blank after using

    Hi,
    I think I need this code:
    Code:
    Me ABEcombo = Null
    to deselect my combo boxes after they've been used so that the page looks clean again.

    I don't know where to put it though.

    For example I have the AfterUpdate event of the above combo as

    Code:
    Private Sub ABEcombo_AfterUpdate()
    
    Dim strForm As String
    strForm = Me!ABEcombo
    DoCmd.OpenForm strForm
    End Sub
    Where would I put code to clear it?

  2. #2
    Join Date
    Jul 2007
    Posts
    72
    Okay,
    I have 8 comboboxes on one form and they operate independently of each other. They just open different forms and you only choose one at any one time.
    If one has been selected the item selected remains in place. I want the selected item to go back to null after an item has been selected.

    This is so the form looks clear if a user wants to change a selection.

    Is this a ReQuery? I'm really stuck here. Or does the whole form need to be reset?

  3. #3
    Join Date
    Feb 2004
    Posts
    214

    ...

    Have you tried

    Private Sub ABEcombo_AfterUpdate()

    Dim strForm As String
    strForm = Me!ABEcombo
    DoCmd.OpenForm strForm
    ABEcombo.value=Null
    End Sub
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  4. #4
    Join Date
    Jul 2007
    Posts
    72
    Thanks so much, that works beautifully.

    So simple, yet so difficult to get right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •