Results 1 to 3 of 3
  1. #1
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46

    Reset a Combo Box VBA Help!

    Morning all!



    I have a combo box and a date field that when both have information produce a report:

    Private Sub SupervisorDailyHuddle_AfterUpdate()
    If Len(Me.SupSelectorDate & vbNullString) = 0 Then
    MsgBox ("Please Select a Date First!"), vbOKOnly, "Enter a Date!"
    Else
    DoCmd.OpenReport "rptSupervisorDailyHuddle", acViewReport
    DoCmd.Close acForm, "frmSupervisorDailyHuddle"
    End If
    End Sub

    Once they hit OK on the msgbox, i would like my combo box to clear.

    Can someone help me please!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Try this right before the Else (*****untested**********) assumes combo is SupervisorDailyHuddle

    Me.SupervisorDailyHuddle=""
    SupervisorDailyHuddle.Requery

  3. #3
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    That worked! Thanks!!! I also added a textfield.SetFocus to my date field.

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

Similar Threads

  1. Reset Combo Box to Default Value After One Hour
    By athyeh in forum Programming
    Replies: 3
    Last Post: 08-14-2013, 10:14 AM
  2. AutoNumber reset
    By Seeletse in forum Access
    Replies: 3
    Last Post: 12-12-2012, 07:14 AM
  3. Reset Filter On Close
    By Power in forum Forms
    Replies: 1
    Last Post: 07-26-2011, 02:41 PM
  4. How to Reset Comboboxes
    By bbarrene in forum Programming
    Replies: 5
    Last Post: 01-23-2010, 11:11 PM
  5. reset primary key
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 03:27 PM

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