Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using arrays in Access/VBA

Status
Not open for further replies.

Thorny

Programmer
Jul 2, 2001
23
GB
Scenario: Allow a user to enter a list of numbers delimetered by commas eg. 234, 456, 2, 45, 87 and output these numbers to a text box but arrange them in order from smallest to largest. The user inputs the numbers into a text box.

I have been using an array but I cannot separate the numbers entered because Access sees the list not as individual numbers but as one string. Please could someone offer a solution to my problem.
 
If Access 2K) Then
[tab]varArray = Split(StringStuff, ",")
[tab]'Sort the array here
[tab]NewStruingStuff = Join(varArray, ",")
Else
[tab]'There needs to be a parse routine or two to do the same as Split & Joion
End If MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top