Results 1 to 4 of 4
  1. #1
    bibbyd01 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7

    Refresh data on menu form

    Hi all

    I'm a little stuck with a on a form

    I have a menu form that has a drop down list, populated by a table, that stores a value to run in a query.

    When the user selects the name in the list, they click a button to run the query/report.

    I then want the list to go back to it's default value, which is blank. I thought I could do this simply by refreshing the menu form, but this causes an error and says that it can not be refreshed at this time. Is there anything else that I can try?

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    At the end of your code that runs the query/report, add the code below:

    Me.YourComboBoxNameHere = Null

  3. #3
    bibbyd01 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    7
    This actually did exactly what I asked, but I didn't include the rest of the details which has somewhat affected the outcome.

    We have a split database due to network instability and I wanted the form the user is using to not access a table unless they were working on it. I noticed that even though the above procedure cleared the combobox field, it still had access to the table in the backend database.

    I cured this problem by closing the form and reopening it when the user navigated back to the menu form. It has worked but probably wasn't the easiest solution.

    Thanks for your help though.

  4. #4
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Based on the above, you could also just close and reopen the form and not worry about clearing the combo box. The user wouldn't have to navigate back to the form that way, and it would clear the selection and allow for more reports/queries to be run back-to-back.

    Docmd.Close acForm, "YourFormName"
    Docmd.OpenForm "YourFormName"

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

Similar Threads

  1. Menu on a form
    By chauhan8787 in forum Forms
    Replies: 2
    Last Post: 02-17-2012, 02:59 PM
  2. Replies: 3
    Last Post: 11-29-2011, 07:01 AM
  3. Access 2010 Refresh VS Refresh ALL
    By Snwboarder1982 in forum Access
    Replies: 1
    Last Post: 09-09-2011, 04:07 PM
  4. Replies: 1
    Last Post: 03-07-2011, 10:48 AM
  5. refresh update data problems
    By whm1 in forum Forms
    Replies: 1
    Last Post: 03-19-2010, 01:49 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