473,378 Members | 1,370 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,378 software developers and data experts.

Ghosts in Multiselect listbox

1
I've got a form that uses a multiselect listbox. When a user is selected from a combo box, values are populated into this listbox associated with that user.

The problem is, if one person has say 10 entries in the listbox, and selects the last 3-4, and the next user only has 2 entries, those last 3-4 rows are still highlighted in the listbox. This introduces null values into my code which is definitely not good.

I've tried using beforeupdate and onclick events for the combo box - but they don't seem to execute at the right time (before the new information is loaded). Does anyone have any ideas for me?

(No, Exorcisms are not an option)

Thanks :)
Jan 16 '07 #1
2 1570
MMcCarthy
14,534 Expert Mod 8TB
I've got a form that uses a multiselect listbox. When a user is selected from a combo box, values are populated into this listbox associated with that user.

The problem is, if one person has say 10 entries in the listbox, and selects the last 3-4, and the next user only has 2 entries, those last 3-4 rows are still highlighted in the listbox. This introduces null values into my code which is definitely not good.

I've tried using beforeupdate and onclick events for the combo box - but they don't seem to execute at the right time (before the new information is loaded). Does anyone have any ideas for me?

(No, Exorcisms are not an option)

Thanks :)
In the Before Update of the Combobox try putting Me.refresh.
Jan 16 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
If that doesn't work put it before the code that requeries the listbox which I assume is in the comboboxes after upate event.

Mary
Jan 16 '07 #3

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

Similar topics

3
by: arthur-e | last post by:
Hi I'm trying to use a multiselect listbox to limit records in a report. My version at work is 97 but now at home I'm using Access2002- I know I can't go backwards ( to use this or similar code at...
2
by: Sally | last post by:
I have a simple multiselect listbox with a rowsorce of MemberID, MemberName, SendLetter. SendLetter is a Yes/No field. What is the code to set SendLetter to Yes when the user selects MemberName? I...
2
by: Cassie Pennington | last post by:
I am trying to write various items from a multiselect list box to an SQL statement to update a report, without success. SQL only appears to accept hard-coded data or control values from a form, not...
2
by: Alan Lane | last post by:
Hello world: I'm using Access 2003. I have 2 listboxes. One is a single column. The other has two columns. I can use Dev Ashish's code (thanks Dev!) from the Access MVP Website to accumulate...
6
by: ¿ Mahesh Kumar | last post by:
Hi groups, Control name : ListboxID (lstCertification), selection mode=mutliselect. On Pageload i'm assinging string lstSplit="1/3/6/8" of the previously selected listindex id's. Now on the...
2
by: Steph | last post by:
I have created a multiselect list box control (lbx_comorb) that is populated from a datatable (dt_ptAdmission). The list box populates now problem at all. However the issue is when I load the...
3
by: kaosyeti via AccessMonster.com | last post by:
hey... i have an unbound multiselect listbox on a form that i want to use to populate text boxes on that form. so if a user selects the 3rd item in a list of 20, how can i have that item show up...
5
by: martin DH | last post by:
Hello, The details are below, but I have a simple form (Form1) with two objects and a "search" command button. When the two objects are cascading combo boxes (the form creates the parameters for a...
1
by: asharma0001 | last post by:
Hi all, I was wondering whether somebody might be able to help me with a question I have on a MS Access Database I'm building. I have created a search form with a few multiselect listboxes....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.