By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 993 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

Access Help

P: 58
I have the code:

Expand|Select|Wrap|Line Numbers
  1. SELECT SalesLic952.CSPC, SalesLic952.DESCRIPTION, SalesLic952.QTY, SalesLic952.NAME, LSList.CITY, LSList.ADDRESS, LSList.[PHONE NUMBER], LSList.[POSTAL CODE]
  2. FROM LSList INNER JOIN SalesLic952 ON LSList.LIC_NO=SalesLic952.CUSTOMER
  3. WHERE SalesLic952.CSPC=nz(forms!Form1!List1,"SalesLic952.CSPC") And LSList.City=nz(forms!Form1!List2,"[LSList].[City]")
  4. ORDER BY SalesLic952.CSPC, LSList.CITY;
This code makes 2 listboxes sort out the appropriate info for me in a table. I need a second column on the first listbox that can be selected along with the same column but doesnt have to be sorted with the others. Basically it should look like this:

Expand|Select|Wrap|Line Numbers
  1. LISTBOX 1                                       LISTBOX2
  2. 375454 | PRODUCTNAME                 city 1
  3. 343432 | PRODUCTNAME2               city 2
  4. 895298 | PRODUCTNAME3               city 3
The info is sorted using the Left hand
side and listbox2. "PRODUCTNAME"
is where i want to create the second
column for the listbox. (just to describe
the number corresponding to it)
I COULD put a label, but it wont scroll
with the corresponding number.
May 16 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,364
I'm confused, why can't they just be in the same listbox?
May 17 '07 #2

P: 58
I'm confused, why can't they just be in the same listbox?
I would like them to be in the same listbox. Side by side. Product# and description.
May 18 '07 #3

Rabbit
Expert Mod 10K+
P: 12,364
I would like them to be in the same listbox. Side by side. Product# and description.
Ok... what problem are you having implementing this?

Your SQL string doesn't create any listboxes. It returns a recordset. That recordset could be used as the source for a listbox but does not create any in of itself.
May 18 '07 #4

Post your reply

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