473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: How to update form after Listbox is updated???

I have a populater listbox and I update the contents by running a
different SQL statement via
listbx.Rowsourc e ="<SQL statement>"

The contents of the listbox changes but the form doesn't.
What sytax or command should I use to update the form fields?

thanks,
c_kubie

Oct 25 '07 #1
2 2984
"C_Kubie" <c_*****@yahoo. comwrote
I have a populater listbox and I update the contents
by running a different SQL statement via
listbx.Rowsourc e ="<SQL statement>"

The contents of the listbox changes but the
form doesn't.
That is exactly what I'd expect from the instruction you show. The
RowSource of a ListBox determines the contents of the ListBox and nothing
else.

What change, exactly, do you want in the contents of the Form? The
RecordSource of a Form determines the contents of the Form.
What sytax or command should I use to update
the form fields?
Without knowing what you have and what you expect, we couldn't be more
specific, nor tell you if your expectations are acheivable.

Larry Linson
Microsoft Access MVP
Oct 26 '07 #2
On Oct 26, 4:36 am, C_Kubie <c_ku...@yahoo. comwrote:
I have a populater listbox and I update the contents by running a
different SQL statement via
listbx.Rowsourc e ="<SQL statement>"

The contents of the listbox changes but the form doesn't.

What sytax or command should I use to update the form fields?

thanks,
c_kubie
try:

Me.Requery
Me.Refresh

HTH

Bubbles

Oct 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2089
by: Jimmy Tran | last post by:
Hi everyone, I have a form consisting of a combo box and two listboxes, they get their control source from a query. the whole form suppose to update a table. when i run the form, i pick an item off of the combo box and hit on refresh. It seems the only thing gets updated into the table is the item from the combo box. the listboxes data doesn't get updated into the table. I click on both of it and it does get updated into the table. but...
1
2788
by: SuffrinMick | last post by:
Hi All I have two tables: tblRecords and tblOptions. tblRecords consists of RecordID (autonumber), Record (text) and Option (text record of options chosen) fields tbloptions consists of OptionID (autonumber) and Option (text) fields. I want to use a form to add/update the records table.
1
2863
by: Chris Capel | last post by:
Ok, so I have a ListBox. So it has these Items. These Items are of type SummaryItem class SummaryItem { public SummaryItem(String prefix) {Prefix = prefix;} public String Value; public String Prefix; public override String ToString() { return Prefix + Value; } }
3
3789
by: Vinay | last post by:
Hello I am trying to update a Progress bar on a form. I am able to update it via using a simple clock timer, but as soon as I perform a long operation G1 (generation of a report) in a separate form, it stops updating it, but keeps on incrementing the Progress bar values in the background and displays the updated Pbar after finishing the operation G1. My requirement is that it should update during the execution of operation G1. On...
3
11089
by: Brian | last post by:
I have a form that has a textbox used to search records in a table. On the form I have a listbox which shows each record in the table. When you click on each row in the listbox the rest of the form updates to show the other fields in the table. The problem I am having is when I enter text to search the table the list narrows successfully, but the rest of the information still reflects the first record in the table. When I click on one of...
5
2295
by: heddy | last post by:
I have a listbox that gets populated in code by a reader result set from a stored proc on SQL Server 2005. In building this I created a set of test rows in the DB and the code runs fine and populates the box. Next I added functionality to add data. This adds data to the DB and then forces the listbox to refresh by clearing it's contents and then re-running the populate code. However, when I add an item and do the refresh, the listbox...
2
1831
by: Wisher | last post by:
I can't update a listbox from other class with it's own thread. My code: The main class: <....> public partial class mainForm : Form { <....> private delegate void AddMessageToLogHandler(object sender, AddMessageToLogArgs e); private object _sender = Thread.CurrentThread; private AddMessageToLogArgs _e;
11
4263
by: OllyJ | last post by:
Hi experts, I'm hoping you can help me with this.. I have recently found out how to use the INSERT INTO statement to add multiple records from a listbox to a table, I now need to UPDATE records in another table using a multi-select listbox. Problem: I want to present a template of working hours of staff by showing 48 x 30minute intervals, each as a row in a listbox. My idea is that if the person usually works 9am till 5pm, there is a yes /...
7
2403
by: BONES7714 | last post by:
Hello, This is my first post to any sort of forum although I've used them to learn the very little Access/VBA that I know so please forgive my ignorance. I work for the National Guard as Combat Medic and I've been tasked with created a DB to track the location of other soldiers medical records and other various infomation. As such, I have a form where I can enter the barcode for a record into a textbox and have it added to a listbox and...
0
8325
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6177
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.