Solved

ListBox not clearing

Posted on 2014-01-27
5
276 Views
Last Modified: 2014-01-27
I have a listbox on a tab of a tabbed form.  But when I click a command button on the form to enter a new record the list box is not clearing.  The data from the previous record is still showing.

I've tried:

Me.Potential_Customer.CallList.Requery    (Potential_Customer in the name of the tab)

and also,

Me.CallList.Requery

But neither work.
0
Comment
Question by:SteveL13
5 Comments
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Try:

Me.CallList = Null

This assumes a non multi select list box.

mx
0
 
LVL 30

Expert Comment

by:hnasr
Comment Utility
Is the list box unbound?
What is the row source of the list box?

Upload a sample database.
0
 

Author Comment

by:SteveL13
Comment Utility
This did not work.  It is a non multi select list box.

The listbox is unbound.  The row source is:

SELECT tblPets.PetID, tblPets.CustID, tblPets.PetName, tblPets.PetLastName, tblPets.PotentialCustID
FROM tblPets
WHERE (((tblPets.CustID)=[Forms]![frmCalls]![txtCustID]))
ORDER BY tblPets.PetName;
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
There's no need to upload a sample database.

You can reset the RowSource:

Me.MyListbox.RowSource = Me.MyListBox.RowSource
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"This did not work. "

What did not work ?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now