Solved

ListBox not clearing

Posted on 2014-01-27
5
281 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

820 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