473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sorting List Box Choices

7 New Member
Hello Everyone...

I have been trying to figure out how to sort the data in a list box. (I want the data in the Pick_Batch list box to be sorted by batch_num.) I've tried the following code, but have been unsuccessful.

[Pick_Batch].RowSource = "Select [batch_num], [batch_receive], [count], [tag_batch] From [tbl_batch] WHERE idnum = '" & Me![Pick_Facility] & "' SORT ORDER [batch_num] "


As you can tell from the code, the data populating the list box, Pick_Batch, is based on the choice of another list box (Pick_Facility). Using this code, the list box becomes blank. I am not sure what to try next. Any help anyone could offer would be extremely apprciated.

Thank you.

Suzanne
Jun 25 '07 #1
2 1501
JConsulting
603 Recognized Expert Contributor
Hello Everyone...

I have been trying to figure out how to sort the data in a list box. (I want the data in the Pick_Batch list box to be sorted by batch_num.) I've tried the following code, but have been unsuccessful.

[Pick_Batch].RowSource = "Select [batch_num], [batch_receive], [count], [tag_batch] From [tbl_batch] WHERE idnum = '" & Me![Pick_Facility] & "' SORT ORDER [batch_num] "


As you can tell from the code, the data populating the list box, Pick_Batch, is based on the choice of another list box (Pick_Facility). Using this code, the list box becomes blank. I am not sure what to try next. Any help anyone could offer would be extremely apprciated.

Thank you.

Suzanne

Expand|Select|Wrap|Line Numbers
  1.  
  2. [Pick_Batch].RowSource = "Select [batch_num], [batch_receive], [count], [tag_batch] From [tbl_batch] WHERE idnum = '" & Me![Pick_Facility] & "'  ORDER By [batch_num] ;"
  3.  
  4.  
Jun 25 '07 #2
suzanne099
7 New Member
Expand|Select|Wrap|Line Numbers
  1.  
  2. [Pick_Batch].RowSource = "Select [batch_num], [batch_receive], [count], [tag_batch] From [tbl_batch] WHERE idnum = '" & Me![Pick_Facility] & "'  ORDER By [batch_num] ;"
  3.  
  4.  

Thank you so much. I guess that was a stupid question. But I was stumped for days.
Jun 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: p0wer | last post by:
Let's suppose I have this sample document: <root> <entry id="1" <date>2003-08-03</date> <param_1>5</param_1> <param_2>10</param_2> </entry> <entry id="2"> ...
16
by: aruna | last post by:
Given a set of integers, how to write a program in C to sort these set of integers using C, given the following conditions a. Do not use arrays b. Do not use any comparison function like if/then...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
6
by: rh0dium | last post by:
Hi all, I am having a bit of difficulty in figuring out an efficient way to split up my data and identify the unique pieces of it. list= Now I want to split each item up on the "_" and...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
20
by: martin-g | last post by:
Hi. Mostly I program in C++, and I'm not fluent in C# and .NET. In my last project I began to use LinkedList<and suddenly noticed that can't find a way to sort it. Does it mean I must implement...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.