Solved

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

Posted on 2009-05-15
4
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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