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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I base a query upon a rowsource of a list of values?

Status
Not open for further replies.

AxeaXeaxE

Programmer
Apr 22, 2002
21
0
0
NL
I'm wondering if I can base a query upon the rowsource of a list of values.

I have a list of values and then I want a query with the argument that one field of the query is based upon the values that are also in the list of values and then proceed with the query to do other things.

I hope you understand because I almost don't. I'm Dutch but I'm doing my best.
 
axe,

Because no one has yet responded, it might be partly because of the need to clarify whether you are referring to Access or Excel.

Perhaps you could also provide a brief example of the list of values. I understand that one of the query fields needs to be derived from a lookup in the separate list of values.

Hope this "getting things rolling".

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
...its possible, and very simple in excel create "Parameter Query" - see MS QUERY HELP in excel...
 
Thx for the reply Dale. It is in Access and in the meantime I've progressed a little bit. I even called Microsoft, but they said it isn't possible (I almost got Bill on the line to ask why it couldn't be done). So it's in Access, I've got a list of values there with the possiblility to select more records. What I want is a query with the condition (criteria) that they are selected in the list of values.

Btw I've got a second list of values that contains all the selected values in the first list, don't know if that makes it easier...

Hope this helps a bit.

There are a few solutions that I know of: create as much labels as there are records to be selected and fill the labels with the selected records. Then the query can be based upon the criteria which are now in the labels. But I don't think it's logical to create 100 lables...

The second solution is to create a new column in the table the query is based upon. Alter the content of that column for the records that are selected in the list of values. Then the query can be made. But I also think this solution is too big.

Can't it be easier?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top