#Deleted in List Box

  • Thread starter Thread starter Keith Willcocks
  • Start date Start date
K

Keith Willcocks

I really seem to be having a bad day.

I have a table which needs to be emptied and refilled at start up. The
table is then used to supply the data for a list box. What I cannot get
over is that, as well as correctly displaying the values, the first line at
the top of the list box is #Deleted. A visual check of the table shows
all records are correct but still the list box picks up this apparent
additional first record. I am assuming that their is something I need to
turn off in properties (or wherever) but I am blessed if I can find
anything.

Keith Willcocks
 
You need to requery the list box after the table delete and refill
After the code that does the table update, you need something like
frmMain.listbox1.Requery
so that the list box refreshes it's connection to the it's record source.
 
I'm guessing that the listbox remains "connected" to that table while you
are deleting its contents... but, post the code that you're using to handle
this entire process and let's see.
 
That did it. I should have remembered that. Five years ago, before I
retired, I was (though I say it myself) a good programmer. Now that I have
agreed to help a friend out who needs an Access program it is really
frightening how much I have forgotten and things have changed. My sincere
thanks to you and the other people on this group who so freely help people
like me.

Keith
 
Thanks for the input Ken. Mray29's suggestion actually sorted it for me
(requery) but as I said in my reply to him, five years ago, before I
retired, I was (though I say it myself) a good programmer. Now that I have
agreed to help a friend out who needs an Access program it is really
frightening how much I have forgotten and things have changed. My sincere
thanks to you, him and the other people on this group who so freely help
people like me.

Keith
 
Keith Willcocks said:
Thanks for the input Ken. Mray29's suggestion actually sorted it for me
(requery)

Yep, that is what I was thinking might be needed, but I didn't want to
assume until I had a better idea of what your code was doing. Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top