473,769 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListBox Not Showing Rows?

One form, two list boxes.

The left box's .RowSource is a query into a work table that selects items where
!IsSelected = False.

The rite box's .RowSource is a query into the same table that selects items
where !IsSelected = True.

If the user doubleclicks a row in the left listbox, DblClick event code sets
!IsSelected=Tru e, updates the record, and requeries both boxes.

Problem is that the rite box doesn't show any rows (although it's .ListCount =1
in spite of .ColumnHeads=Fa lse.

Even if I go into the Immediate window and do a
Forms!frmWhatev er!lstRite.Requ ery,

nothing shows.... and if I do a
?Forms!frmWhate ver.RowSource,

the expected query name is returned... and if I open up that query
independently, the expected items show.

The zinger is that if I go into design mode and to a copy/paste of the offending
listbox into a new form, it does show it's rows.

Gotta be something with the form, right?

But what?

I've tried doing a SaveAsText and LoadFromText in case the form is corrupted,
but no luck.

Anybody been here?
--
PeteCresswell
Nov 13 '05 #1
1 3151
Per (PeteCresswell) :
Gotta be something with the form, right?

But what?


Turns out that the form was spontaneously deleting the .RowSource - or something
like that.... kinda weird bc the ?.RowSource returned the name of the expected
query... but it just wasn't having any effect.

Threw in a few lines of code here-and-there to set .RowSource and it's back in
business.

Sheesh!.... that was about six hours down the drain....
--
PeteCresswell
Nov 13 '05 #2

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

Similar topics

2
367
by: JMorrell | last post by:
I’m trying to populate a listbox with data that comes from my SQL server. I’ve created the connection, filled the dataset and loaded the data adapter. Apparently, I’m missing something because after this runs, what is populated in the listbox is: “System.Data.DataRowView” for each record in my data adapter. When I click on one of the rows (which really doesn’t make sense) as I test the rest of my routine, I’m able to trick...
7
2010
by: Colleyville Alan | last post by:
I have an app in which users are displayed a list of mutual fund from which they can choose. There is a listbox embedded in a two-tabbed notebook control. When the form is initally opened, the listbox loads info: Private Sub Form_Open(Cancel As Integer) TabControl.Value = 0 Tab_Label1.Caption = "Select Alternatives from the Select List" FundAlternativesList.RowSource = "Load_Select_Alternatives_Form" Call Highlight_Defaults End Sub
1
2893
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get bunched up at the right, i.e. squashed up! any idea why? The main bit of the code is as such // (in progressReporter.cs) protected struct LBRow //a row of the listbox, whether it be the title or a
4
4352
by: James Radke | last post by:
Hello, I am creating an owner draw listbox for a windows application. It is all working, except the performance is significantly slower than the standard listbox. Basically what I have done is added two new properties (full source below): ChangeBackgroundMember = a bound data field which contains a boolean as to whether this record should get a special background color ChangeBackgroundColor = the color to use when the above...
3
2429
by: Hugh O | last post by:
Hi, There is a ROW property on the Web Listbox control within VB.Net. The description states it is "The number of visible rows to display". I have tried setting this property in many different ways. It does not appear to do much of anything. I was trying to use it to control the actual size in rows of the list box on the Web page. But the size of the Web listbox seems to be fixed and controlled by the size of the control set in the...
10
8571
by: ken | last post by:
Hi, Say I have a list box. I also created a control on a form bound to that list box. When I click different rows in the listbox the control changes the ID of the row depending on what I click. One thing I'm doing is setting the .selected(i) property of the list box to true. On the screen I see that a different row gets hillighted, but the bound control on the form is showing the wrong value? So changing what is selected with code did...
4
4850
by: Marcos Beccar Varela | GamaCom Argentina | last post by:
Hello Everyone. I need to use a gridview, that when I use the Update command one of the colums, instead of showing a textbox where the user can write, I need a combobox (listobx), where there are 3 options. EG OF GRIDVIEW: USUER AGE carlosg old rominat young gonzalor normal florenciat young
3
5768
by: perrycheung221 | last post by:
Hi guys, I got 2 listboxes in a window form, one on left and one on right. The 1st listbox have some items while the 2nd listbox is empty. Also there are 2 buttons between the 2 listboxes which used to move item from/to the 1st and 2nd listbox My problem here is that after I bind the data to the 1st listbox (from a dataTable, using DisplayMember and ValueMember), and I try to move 1 of the item from this 1st listbox to the 2nd listbox...
11
4276
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 /...
0
9423
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,...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7409
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
5299
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
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
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.