Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After updating listbox, populate another 2

Status
Not open for further replies.

NRK

Technical User
Feb 13, 2002
116
US
I am trying to create a form (Query by form) that will allow users to first select one or many records from listbox (Category field). Then, on After Updated of that listbox, I want my second listbox to populate with all the records that are associated with the selected Category or Categories.

My logic is that I should create a data string (from the first listbox) and then plug that string into the criteria for the query that the second listbox references.

I am unsure if I have built my code wrong or if this is not possible. As yet, I have been unable to find much help on this topic. I hope that you will be able to help...
 
I've not run into this problem, but it sounds like you the string cannot handle more than 100 selections. How about sending me your db to papparuff@covad.net and let me play with it. I only need the appropriate table and the form. Compact it before you attach it and if you have WinZip (a free download from zip it up. John Ruff - The Eternal Optimist :)
 
I just created a table and added 999 records to it. TC-AC001 thru TC-AC999. I was able to select all 999 of them from the listID and copy them to the listFilter listbox with no errors whatsoever. This is telling me you may have some other issues going on. John Ruff - The Eternal Optimist :)
 
John,
Thanks for the test. Also, don't think I made my issue clear. My problem occurs when I try to filter my report from the values in listFilter. That is when I get the run-time error.

I am cleaning up my db and will send it to you shortly. Maybe if we both work at it, we can figure something out...
 
We'll figure it out! I'm an Eternal Optimist :) John Ruff - The Eternal Optimist :)
 
Although this doesn't address the problem completely, but when I add 97 records to listFilter and then try to filter the report - it works. At 98 records, it fails.

The total character count for the listbox at 97 records is 2,033 and 2,054 at 98 records. Could this be the issue (exceeding char. limits for a string)?

I thought that string could hold up to 65,400 characters, but maybe I don't have the properties set right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top