A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I put an array into a combobox



 
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2010, 09:55 AM posted to microsoft.public.access
Frits.van Leeuwen
external usenet poster
 
Posts: 17
Default How do I put an array into a combobox

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


  #2  
Old March 2nd, 2010, 04:30 PM posted to microsoft.public.access
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default How do I put an array into a combobox

On Tue, 2 Mar 2010 09:55:52 +0100, "Frits.van Leeuwen"
wrote:

Here is a hint: a combobox has a RowSourceType property which can be
set to Value List. Then you can set the RowSource property to a string
with semicolon-separated values.

-Tom.
Microsoft Access MVP


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

  #3  
Old March 2nd, 2010, 05:49 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How do I put an array into a combobox

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]
  #4  
Old March 3rd, 2010, 12:33 PM 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]




  #5  
Old March 3rd, 2010, 02:14 PM posted to microsoft.public.access
Frits.van Leeuwen
external usenet poster
 
Posts: 17
Default How do I put an array into a combobox

Thanks Tom.
It's verry helpful

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

Here is a hint: a combobox has a RowSourceType property which can be
set to Value List. Then you can set the RowSource property to a string
with semicolon-separated values.

-Tom.
Microsoft Access MVP


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




  #6  
Old March 13th, 2010, 06:55 PM posted to microsoft.public.access
De Jager
external usenet poster
 
Posts: 393
Default How do I put an array into a combobox


"Frits.van Leeuwen" wrote in message
...
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


  #7  
Old March 17th, 2010, 02:40 PM posted to microsoft.public.access
joelgeraldine
external usenet poster
 
Posts: 201
Default How do I put an array into a combobox

k;;;cnnn

"Frits.van Leeuwen" a écrit dans le message
de groupe de discussion : ...
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

  #8  
Old March 18th, 2010, 11:24 AM posted to microsoft.public.access
Frits.van Leeuwen
external usenet poster
 
Posts: 17
Default How do I put an array into a combobox

What do you mean?
"joelgeraldine" schreef in bericht
...
k;;;cnnn

"Frits.van Leeuwen" a écrit dans le
message de groupe de discussion : ...
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.