sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Alex's Avatar

Adding a row to a combo box


Question posted by: Alex (Guest) on November 13th, 2005 04:04 AM
I have spent all day trying to use MS sample code AddAllToList()
I have followed the instructions exactly but the combo box is always
blank.
If I change the RowSourceType to table/query I get a list (obviously
without the additional row) but when the RowSourceType is AddAllToList
I get a blank list.

1. Set the RowSourceType to AddAllToList
2. Enter in the tag setting the column number, in my case 1 but I have
tried others.

Result blank list.
Can anyone help to throw some light on this please.
I am using Access2K

Alex
3 Answers Posted
Paradigm's Avatar
Guest - n/a Posts
#2: Re: Adding a row to a combo box

I should have said that if I put msgboxes or debug.print into the code I do
not get any messages. It does not appear to be even accessing the code when
I select the combo box.
Alec

"Alex" <alecjames1@hotmail.com> wrote in message
news:4995a98d.0409200301.41b4c130@posting.google.c om...[color=blue]
> I have spent all day trying to use MS sample code AddAllToList()
> I have followed the instructions exactly but the combo box is always
> blank.
> If I change the RowSourceType to table/query I get a list (obviously
> without the additional row) but when the RowSourceType is AddAllToList
> I get a blank list.
>
> 1. Set the RowSourceType to AddAllToList
> 2. Enter in the tag setting the column number, in my case 1 but I have
> tried others.
>
> Result blank list.
> Can anyone help to throw some light on this please.
> I am using Access2K
>
> Alex[/color]


Alec's Avatar
Guest - n/a Posts
#3: Re: Adding a row to a combo box

The RowSource can be a list of values, usually like this:

"Item A";"Item B";"Item C"

If you first extract the RowSource to a variable then re-assign the
RowSource to:

yourVariable & ";"""ItemToAdd""""

and this will add the item to the end of the list.

HTH

Alec Christie
alec_e_christie(at)hotmail(dot)com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
David Neagle's Avatar
Guest - n/a Posts
#4: Re: Adding a row to a combo box

Join Bytes! (Alex) wrote in message news:<4995a98d.0409200301.41b4c130@posting.google.com>...[color=blue]
> I have spent all day trying to use MS sample code AddAllToList()
> I have followed the instructions exactly but the combo box is always
> blank.
> If I change the RowSourceType to table/query I get a list (obviously
> without the additional row) but when the RowSourceType is AddAllToList
> I get a blank list.
>
> 1. Set the RowSourceType to AddAllToList
> 2. Enter in the tag setting the column number, in my case 1 but I have
> tried others.
>
> Result blank list.
> Can anyone help to throw some light on this please.
> I am using Access2K
>
> Alex[/color]

Alex, are you trying to add a single row to your combobox? If so, you
need the On Not In List event procedure.
David
 
Not the answer you were looking for? Post your question . . .
196,873 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,873 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors