473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

listboxes and setting selection as criteria

Does anyone know how to do this?

I want to create 2 listboxes. Each listbox must contain a column from a table that has been imported. Example for the 1st listbox:

288394 CALVIN KLEIN ESCAPE (500mL)
239484 HUGO BOSS (650mL)
874257 JEANPAULG (500mL) ..and so on

The second listbox must contain Cities. (also taken from a table made in excel)

Now, I want to be able to choose a product, choose a specific city, and press a command button so it will direct me to a screen that lets me know how much of that product was ordered or sold in that particular city.

any suggestions ?
May 8 '07
52 3627
JConsulting
603 Expert 512MB
i figured out the problem! instead of using frm in front of Form1 or lst in front of List1, i just use their names. even in the code for the query! it works!! wow, all that for one little thing :) thanks dude ;p u have no idea how happy i am. now that thats figured out, I can tell it to find other things as well.
I'm very glad you didn't quit. Hopefully the troubleshooting tips and all the steps we took will help you along the way. If you will...for the sake of the knowledge base on this site...if you can paste in the final solution, that would be great.

J
May 10 '07 #51
I'm very glad you didn't quit. Hopefully the troubleshooting tips and all the steps we took will help you along the way. If you will...for the sake of the knowledge base on this site...if you can paste in the final solution, that would be great.

J
the following code was entered in my query:
SELECT [SalesLic952].[CSPC], [SalesLic952].[NAME], [LSList].[CITY], [LSList].[ADDRESS], [LSList].[POSTAL CODE], [SalesLic952].[QTY]
FROM LSList INNER JOIN SalesLic952 ON [LSList].[LIC_NO]=[SalesLic952].[CUSTOMER]
WHERE [SalesLic952].[CSPC]=nz([forms]![Form1]![List1],"SalesLic952.CSPC") And [LSList].[City]=nz([forms]![Form1]![List2],"[LSList].[City]")
ORDER BY [SalesLic952].[CSPC], [LSList].[CITY];
May 10 '07 #52
is there anyway I can create a msgbox with Ok only. Lets say if only one option is chosen or no option chosen and the command button is clicked.
May 11 '07 #53

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

Similar topics

0
by: Jeffrey Barish | last post by:
I have an application that produces two listboxes. I would like to be able to select one of the items in the first listbox and one of the items in the second listbox. However, when I make my...
1
by: Ryan | last post by:
Hello, I have a quick question (I hope). I have a form with a combo box and a multi-selection list box. The list box is based on a query. Users can select values from the cmbobox to add to...
6
by: Ralph2 | last post by:
Some time ago with a lot of help from this group I made a reasonably successful database to keep track of our shop drawings. However the searching mechanism is too complicated for the occasional...
8
by: Steve Jorgensen | last post by:
Mailing List management is a good example of a case where my conundrum arises. Say there is a m-m relationship between parties and groups - anyone can be a member of any combintation of groups. ...
4
by: bill yeager | last post by:
I have several template columns inside of a datagrid. Inside of these template columns are databound listboxes: <asp:TemplateColumn HeaderText="Crew Chiefs"> <ItemTemplate> <asp:listbox...
2
by: waterox | last post by:
Hi, I am trying to hack this mp3 player so that it displays 3 levels of hierarchy instead of 2. Check out the current player here http://www.yanwhite.com/staging/GetGoodMusic/music.htm ...
1
by: The.Daryl.Lu | last post by:
Hi, two parts to my problem if someone can help address either one or both: 1. I want to SELECT everything in the table if it matches the criteria when the query button is pressed (this is just...
2
by: Aussie Rules | last post by:
Hi, I have a access 2007 database with a cross tab query. Based on the selection critieria the cross tab may contain a different number columns in the result. For example if the query is...
3
JodiPhillips
by: JodiPhillips | last post by:
Hello everyone, there are many questions and answers relating to moving items between two listboxes here and on the net in general, however, none answer my specific problem. I have two listboxes...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.