Solved

ListBox not clearing

Posted on 2014-01-27
5
278 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
ID: 39812786
Try:

Me.CallList = Null

This assumes a non multi select list box.

mx
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39812794
Is the list box unbound?
What is the row source of the list box?

Upload a sample database.
0
 

Author Comment

by:SteveL13
ID: 39812841
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
ID: 39812879
There's no need to upload a sample database.

You can reset the RowSource:

Me.MyListbox.RowSource = Me.MyListBox.RowSource
0
 
LVL 75
ID: 39812887
"This did not work. "

What did not work ?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

912 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

19 Experts available now in Live!

Get 1:1 Help Now