• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

ListBox not clearing

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,


But neither work.
1 Solution
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:

Me.CallList = Null

This assumes a non multi select list box.

Is the list box unbound?
What is the row source of the list box?

Upload a sample database.
SteveL13Author Commented:
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;
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
There's no need to upload a sample database.

You can reset the RowSource:

Me.MyListbox.RowSource = Me.MyListBox.RowSource
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
"This did not work. "

What did not work ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now