Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How make listbox requery or refresh when go to a new or different record

Posted on 2009-05-15
4
Medium Priority
?
343 Views
Last Modified: 2012-05-07
I have a form which contains a listbox.  On the form I have created a new record button.  When I click on the new record button the listbox is not refreshing or requering the data associated to the record number of the form.  The listbox is driven by a query which has criteria set to use the record number from the form itself.  What am I doing wrong?  I have tried...
    DoCmd.GoToRecord , , acNewRec
    [List24].Requery
on the onclick event of the new record button but that isn't working.
0
Comment
Question by:SteveL13
  • 2
  • 2
4 Comments
 
LVL 75
ID: 24398364
Can you post the SQL of the query driving the list box ?

When you go to a new record ... no new record actually exists until you enter edit at least one bound control.

Does this work when you go to existing records?

What exactly do you meant by 'record number'?  The Access Auto Counter ?

mx
0
 
LVL 44

Accepted Solution

by:
GRayL earned 2000 total points
ID: 24398458
Me![List24].Requery
0
 
LVL 44

Expert Comment

by:GRayL
ID: 24403409
Thanks, glad to help
0
 
LVL 75
ID: 24403479
This should have worked the

 [List24].Requery

You don't have to use the Me keyword.

mx
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question