Solved

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

Posted on 2009-05-15
4
310 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 500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

785 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