Results 1 to 7 of 7
  1. #1
    oakoen is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2009
    Posts
    15

    Loosing list box slection after refresh

    I have a form (Main) with a list box (customer_name) and tabbed pages that show info from related tables about the customer selected.



    One tab page has a button that pops up a different form, adds a new record with the data selected in the list_box. That works.

    Here is where my issue lies.

    When the pop up form is closed and the main form refreshed to show the newly added record, the tabbed pages that showed info for the selection in the list box defaults back to the first record even though the list box still shows the original selection highlighted.

    I hope that makes sense.

    I am not a guru. Got this far using google and by trial and error. If you can help please KISS.

    Thank you in advance.

    John

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    oakoen is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2009
    Posts
    15
    Yes! Thank you, that is exactly the issue. Works like a charm.

    Is there a way to accomplish this with out user interaction? Like on the close of another form???

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sure, you should be able to do the same thing from the close event of the other form. You would need to change the "Me" form references to the full form reference.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    oakoen is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2009
    Posts
    15
    Thank you very much!!!!!!!!

    Exactly what I needed.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    warmlf is offline Novice
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    1
    I am having the same issue but am not sure how to apply your code or where to apply it. I am very new to access so please be nice to me I have a form with a button that closes the form and opens another to add a record. When I am finished adding the record there is a button that closes that form and brings me back to the original form but this time with a filter for the current record. Now i want to click the combobox and go to a different record. I was able to clear the filter by putting in: Private Sub cboMovieTitle_Click()
    Me.Filter = ""
    Me.FilterOn = False
    End Sub

    That was all good so far.
    Now the problem.
    When I select a record it goes to the first record only. I have to reselect again to go to a different record. You guys sound like you probably have an easy sollution and maybe the requery you posted was it. Like oakoen I don't want any special user input. thanks in advance for your help.

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

Similar Threads

  1. Refresh Query using Value on Form?
    By AKQTS in forum Programming
    Replies: 3
    Last Post: 10-25-2010, 09:33 AM
  2. refresh subform
    By asmith in forum Forms
    Replies: 5
    Last Post: 09-27-2010, 10:58 AM
  3. refresh a form
    By RedGoneWILD in forum Forms
    Replies: 18
    Last Post: 09-03-2010, 08:31 AM
  4. Refresh a list box
    By Orabidoo in forum Forms
    Replies: 9
    Last Post: 04-17-2009, 04:07 PM
  5. refresh datasheet as text changes
    By mkhan in forum Forms
    Replies: 0
    Last Post: 09-06-2008, 07:46 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