Hello,
I have a continuous form with a combo box inside. From the combo box I can
pick some values which, by the "after-update" event, change some other combo
box values determined by a query.
(i.e. I have some tree names and depending on what tree I pick on the other
combo box I can pick its fruits and other properties)
Now, mine is a continous form, and whenever I pick a value from the first
combo box the second one correctly shows the updated values, but the first
combo influences all records' combos in the form.
This way, following with my trees example, if I change the third tree all
combo boxes with properties for other trees change showing properties
related to this tree.
This is the query of the second combo box that depends on the first one
(IDTree):
SELECT DISTINCTROW TblProps.IDProp, TblProps.PropName, TblProps.IDTree FROM
TblProps WHERE (TblProps.IDTree=CurrentRecord.IDTree.value)
What am I doing wrong?
Thanks in advance,
G 4 2960
I have a listbox with 13 columns in it, the bound column being column
1. I want to query a table with the list of values in the bound column
being used as the criteria. It doesn't matter to me if anything is
selected, I just want the entire list of values from the bound column.
I know I could do this looping through the listbox, but I'd rather
avoid that.
I'm thinking something like this:
"SELECT * FROM tblCustomers WHERE CustomerID IN " &[list of values
from bound column] & ""
the customerid is stored as a long int
Is it possible? Is there another way to do what I want without looping
through the listbox?
Any help would be really appreciated.
thank you
"arejay" <ar*******@yahoo.com> wrote in message
news:gr********************************@4ax.com... I have a listbox with 13 columns in it, the bound column being column 1. I want to query a table with the list of values in the bound column being used as the criteria. It doesn't matter to me if anything is selected, I just want the entire list of values from the bound column.
I know I could do this looping through the listbox, but I'd rather avoid that.
I'm thinking something like this:
"SELECT * FROM tblCustomers WHERE CustomerID IN " &[list of values from bound column] & ""
arejay,
Do you mean the value in the bound column from every row in the listbox? as
in SELECT * FROM TABLE WHERE CustomerID = 1 or CustomerID = 2 or CustomerID
= 3.... (where 1,2 and 3 are found in the bound column in the listbox)?
If that's the case, save the listbox rowsource as a query (if it's not
already) and use it in another query, something like:
SELECT T.*
FROM TABLE T INNER JOIN listBoxQuery Q
ON T.CustomerID = Q.CustomerID;
the customerid is stored as a long int
Is it possible? Is there another way to do what I want without looping through the listbox?
Any help would be really appreciated.
thank you
arejay <ar*******@yahoo.com> wrote in message news:<gr********************************@4ax.com>. .. I have a listbox with 13 columns in it, the bound column being column 1. I want to query a table with the list of values in the bound column being used as the criteria. It doesn't matter to me if anything is selected, I just want the entire list of values from the bound column.
I know I could do this looping through the listbox, but I'd rather avoid that.
Yeah, I'd like to make lots of money, but I'd rather not work. Umm...
Wake up, you're dreaming. That's the ONLY way to get all the values
from a listbox, well, if your MultiSelect property is set to True.
There's code at www.mvps.org/access that will loop through the
listbox... and you'll have to build the SQL on the fly. Maybe create
a function to concatenate the items in the Selected collection of the
listbox and then use that.
"Pieter Linden" <pi********@hotmail.com> wrote in message
news:bf*************************@posting.google.co m... arejay <ar*******@yahoo.com> wrote in message
news:<gr********************************@4ax.com>. .. I have a listbox with 13 columns in it, the bound column being column 1. I want to query a table with the list of values in the bound column being used as the criteria. It doesn't matter to me if anything is selected, I just want the entire list of values from the bound column.
I know I could do this looping through the listbox, but I'd rather avoid that. Yeah, I'd like to make lots of money, but I'd rather not work. Umm... Wake up, you're dreaming. That's the ONLY way to get all the values from a listbox, well, if your MultiSelect property is set to True.
It's always a bad idea to say ONLY or ALWAYS (a little recursive
disclaimer..)
If the listbox has a query for a rowsource, you can get the values from the
query. Maybe you misread - he doesn't say they have to be selected, just in
the list.
There's code at www.mvps.org/access that will loop through the listbox... and you'll have to build the SQL on the fly. Maybe create a function to concatenate the items in the Selected collection of the listbox and then use that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gx |
last post by:
I have this form with the fields:
* Product: (drop down combo box)
with choices - X, Y
* Amount: (currency )
* Balance (currency)
I want to associate product X with the percentage...
|
by: Giulio |
last post by:
Hello,
I have a continuous form with a combo box inside. From the combo box I can
pick some values which, by the "after-update" event, change some other combo
box values determined by a query....
|
by: MX1 |
last post by:
I'm ready to pull the hair out of my head. I have a query with a couple of
parameters that I want to get from combo boxes on a form. One parameter is
a date with a dynamically calculated year and...
|
by: Scott Morford |
last post by:
This is a followup to a question I posed last summer.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&selm=3f451dd4%240%241095%247f8943f3%40newsreader.visi.com
I'm developing a weed...
|
by: Rated R1 |
last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got
and see if someone can please help me. Email me and we can set something up as
Id even be willing to pay for your...
|
by: meganrobertson22 |
last post by:
Hi Everyone-
I have a question about how to add and then use the "All" selection in
a combo box. I am trying to figure out how to:
(1) add "All" as a selection to a combo box and then
(2)...
|
by: |
last post by:
Hi everyone,
I have a form with a combo box on it. When you select a value (a PO#) from
the combo box, the bound field is the indexID of the selected PO. On the
same form, I have a text box...
|
by: jjyconsulting |
last post by:
Newbie needing some help. I have a tblParticipants. The fields
include gender, education_level, income, occupation etc., I'm trying to
create a form where a user can run a query from the form and...
|
by: Jim |
last post by:
I have a form with a combo that is linked to another query. It's my way of
getting a value that I need displayed on the form. Only problem is the value
isn't there until I select the combo...
|
by: exipnakias |
last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table.
I want:
1)
..to create a query where a parameter will be needed in order to be loaded.
But I do not want to...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |