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

Populate listbox rowsource from function

Hi

I'm trying to populate a listbox as a value list in code (access
2003).

Unfortunately I'm getting 'runtime error 2176 - the setting for this
property is too long' somewhere around the 2000 character mark.

Searching on the web I've seen mention that there is a limit of 2048
characters for a value list and that a workaround is to use a function
to populate the list. But I can't see anywhere how to actually do
this.

Does anyone have a reference or an example of how it works?

(I can populate the list fine using a query, but would prefer not to
have the control bound to the data.)

TIA

Jun 27 '08 #1
1 5796
On Apr 16, 8:04 am, Chaihana Joe <i...@chezburns.comwrote:
Hi

I'm trying to populate a listbox as a value list in code (access
2003).

Unfortunately I'm getting 'runtime error 2176 - the setting for this
property is too long' somewhere around the 2000 character mark.

Searching on the web I've seen mention that there is a limit of 2048
characters for a value list and that a workaround is to use a function
to populate the list. But I can't see anywhere how to actually do
this.

Does anyone have a reference or an example of how it works?

(I can populate the list fine using a query, but would prefer not to
have the control bound to the data.)

TIA
There is a good example of this (using a callback function to fill a
listbox) by Dev Ashish at the Access web:

http://www.mvps.org/access/forms/frm0049.htm

HTH,
Bruce
Jun 27 '08 #2

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

Similar topics

2
by: James Goodman | last post by:
I have a listbox named sub1 on an asp page. I need to fill this list with values from a table. These are selected based upon the selection of a value/s in another listbox. It was suggested that I...
2
by: James A | last post by:
I have 3 problems which I'd like people to solve for me (I've run out of ideas) 1) I have a table called s7-300. If i simply run this line of code: lstResult.rowsource = "Select * FROM...
5
by: Mark | last post by:
How can I populate a listbox with a list of the filenames in a certain folder? Can a query retrieve the filenames from a folder? Thanks! Mark
0
by: James | last post by:
Hello, This is a bit complicated but the bottom line is this: I have a form, class, and 'wrapper' function in an MDE that I have listed in my References. (The 'wrapper' is to enable referring to...
1
by: Grant Hammond | last post by:
I have a callback function that populates a listbox with a list of file names in a folder. This code came from Terry Kreft/Dev Ashish some years ago. I now want to add another column to the list...
4
by: Corey | last post by:
I am having some real trouble getting a listbox rowsource to load properly. The listbox is actually on a subform. My main form has several command buttons that change the MASTER_SUB_FORM object...
3
by: Prochot | last post by:
I'm trying to design a database to track projects and the associates assigned to them. I have almost no experience with this. I have three tables: -Projects -Associates -Assignments where...
6
by: cwhitcomb2 | last post by:
I have created a form in my database that resembles a calendar. I have 42 textboxes that display the day of the week for whatever month and year is selected in the combo boxes at the top of the form....
4
by: George Allen | last post by:
I have been experimenting wiht using the Listbox Callback function to solve an issue I have with my db tool. The function below connects ADO to a SQL server database and table and reads those...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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.