View Single Post
  #4  
Old March 3rd, 2010, 11:33 AM posted to microsoft.public.access
Frits.van Leeuwen
external usenet poster
 
Posts: 17
Default How do I put an array into a combobox

Thanks John for help.
But I do not like to create an table for this.

"John W. Vinson" schreef in bericht
...
On Tue, 2 Mar 2010 09:55:52 +0100, "Frits.van Leeuwen"
wrote:

Hello,

I'm using MS Access 2007. I've made a form with a field for a number. This
is needed to create an array.
So I have an array from 1 to the number I put in.
Then I like to show this array in a combobox so I can give a posibility to
select 1 of the numbers.
Who can help me?

Regards,
Frits


I'd use an auxiliary table for this. Create a table Num with one Long
Integer
field N; fill it with values from 1 to the largest number you'll ever need
(be
generous, even 50000 rows is a small table).

Base your combo box on a query:

SELECT N FROM Num WHERE N = [Forms]![yourform]![numberfield] ORDER BY N;

Requery the combo box in the afterupdate event of the textbox.

--

John W. Vinson [MVP]