By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

Can a multi-dimensional array be the control source for a combo box?

P: n/a
Ron
Hi,

If it's possible, a quick example would REALLY help. I'm clueless which
makes me boxless as well. ::grin::

TIA
ron
Apr 27 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If the items in the array are not changing while the form is open, you have
a couple of options.

In the most recent versions of Access, you can set the RowSourceType of the
combo to Value List, specify the correct number of columns in the combo's
Column Count, and loop through the array building up a string to use in its
Row Source.

It is also possible to craft a special callback function to use in the
RowSourceType of the combo, and initialize it with the values for the array.
This is not really for the clueless, but there's an example in this page:
http://allenbrowne.com/func-02.html
The example loads the files in C:\ into an array, and then populates the
columns of the combo from the static array.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ron" <ro*******************@earthlink.com> wrote in message
news:NU*****************@newsread2.news.pas.earthl ink.net...
Hi,

If it's possible, a quick example would REALLY help. I'm clueless which
makes me boxless as well. ::grin::

TIA
ron

Apr 27 '06 #2

P: n/a
Well, sort of...you can map the array to a combo box using call back
functions....

an example of call back can be found here

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

A little bit of creative code...and you can map the array to the combo since
the call back has both a col/row setting....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
Apr 27 '06 #3

P: n/a
Ron
Hi Allen,

Thanks! Your callback function showed me the way. I altered it a tad using
the path to my data files and a few other changes I think will be more
appealing to my users, but that definitely was a BIG help.

I breezed through the other response (thanks to Albert for taking the time
to respond!) and looked at the callback function of Dev Ashish that he sent
along, but your response was first (by 4 whole minutes) so I abused...er...
used your example.

Allen, I appreciate your time and expertise. I've already found a wealth of
info from your "tips" pages and it just hadn't connected that that's what I
needed.

Again, thanks to you both for responding!
ron

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:44***********************@per-qv1-newsreader-01.iinet.net.au...
If the items in the array are not changing while the form is open, you
have a couple of options.

In the most recent versions of Access, you can set the RowSourceType of
the combo to Value List, specify the correct number of columns in the
combo's Column Count, and loop through the array building up a string to
use in its Row Source.

It is also possible to craft a special callback function to use in the
RowSourceType of the combo, and initialize it with the values for the
array. This is not really for the clueless, but there's an example in this
page:
http://allenbrowne.com/func-02.html
The example loads the files in C:\ into an array, and then populates the
columns of the combo from the static array.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ron" <ro*******************@earthlink.com> wrote in message
news:NU*****************@newsread2.news.pas.earthl ink.net...
Hi,

If it's possible, a quick example would REALLY help. I'm clueless which
makes me boxless as well. ::grin::

TIA
ron


Apr 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.