473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Refresh Listbox

71
I've got a list box that has about 6-7 columns with information, pulled from a table. When you click on a row in the list box it displays all the information in a series of text boxes, so that the information can be edited. I've got an add and delete button, so you can select a row in the listbox, then delete it; or enter information in the listboxes, then click the add button and add the information to the table.

The buttons work fine with regard to making the changed so the table. Now I'm looking for a way to essentially refresh the listbox when the button is pressed to represent the new table information. I'm trying to use the .Requery method, but it doesn't seem to work.

Now, if I delete a line, then click on another line, it will show "#deleted" (or something to that effect) for each item in the row; but it won't clear it away. Any help for how to get the listbox to refresh would be greatly appreciated. Thank you in advanace.
Jul 16 '07 #1
5 3463
rsteph
71
Anyone have any thoughts on where I could start to look to figure this out?
Jul 17 '07 #2
Stang02GT
1,208 Expert 1GB
http://www.kayodeok.btinternet.co.uk/favorites/kbofficeaccesshowto.htm
http://www.accessmonster.com/
http://www.databasedev.co.uk/forms.html
http://www.mvps.org/access/



here are some very good access sites that will be able to help you out
Jul 17 '07 #3
JKing
1,206 Expert 1GB
Hi, I tested this out and Requery successfully removes the deleted rows for me.

Are you using .Requery for the form or the listbox itself? Perhaps you could post your code because there maybe something else that is wrong.
Jul 17 '07 #4
rsteph
71
Nevermind I'm dumb, after looking through this some more I realized I was putting the .Requery line in the wrong place in the code. I had accidentally placed it in the error handling section. I've got that working now.
Jul 31 '07 #5
JKing
1,206 Expert 1GB
Nevermind I'm dumb, after looking through this some more I realized I was putting the .Requery line in the wrong place in the code. I had accidentally placed it in the error handling section. I've got that working now.
Hehe, you're not dumb. It's a common mistake and happens even to the best of us. Just earlier today I spent over an hour trying to figure an error out to find I needed to move a statement one line up. Sometimes the most simple errors can be the most painful to solve.

Glad you resolved it though.

Jking
Jul 31 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end...
1
by: Bish | last post by:
I want to create a .Net page with 2 controls. The 1st is a dropdown being populated from a database. The 2nd control is a listbox which is also populated from the same database but the content is...
3
by: Brian Basquille | last post by:
Hey there all, Fairly easy question for a C# expert, i assume! Am still working on my Photo Album. On frmBrowsePhotos, i have a listBox (photosList) containing photoID's from a table in an...
1
by: Tariq | last post by:
Hi, I have a list box that is bound to an arraylist, but when the data changes the listbox does not refresh. ----------------------------------------------------------------------------- al =...
2
by: Rosanne | last post by:
Hi All - I have a strange problem - I have an aspx page that contains server-side, multi-select listbox. The AutoPostBack property is set t false. The user should click on an item in the...
2
by: Arne Meissner | last post by:
Hello! Is there a function to update/refresh a listbox widget. My one is connected to a database and after a change of the database I would like the listbox to be updated. Thank you for your...
5
by: Randy | last post by:
I have button that deletes items from a SQL datatable. The items are displayed for the user in listbox, which is bound to the dataset. The code works just fine insofar as it deletes the correct...
7
by: Randy | last post by:
Hi, I've got a listbox on a form that gets updated by opening another form for data entry. Once the user enters the new item name and clicks "accept", the data entry form closes and the original...
5
by: BlackBox | last post by:
I have a Listbox1 in the main form and I can add listbox1 items in the parent form. But when I close the parent form Listbox1 in the main form does not get refresh. I need to re-open the app. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.