Solved

ListBox not clearing

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

778 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