Run a query based on a list of account numbers within a drop box.... (1 Viewer)

Number11

Member
Local time
Today, 03:39
Joined
Jan 29, 2020
Messages
213
So here is something that is going to test all - I need to work out if its possible for a query to run against the criteria within a list - so have the option to cut and paste a list off account numbers into say a form and on clicking a button the query runs looking at the account numbers in that form list - or is this a total dream! :)
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 22:39
Joined
Jan 23, 2006
Messages
13,402
What exactly is the purpose of the query?
You have a list of account numbers and with each of those you want to determine XXX?
You could put those account numbers in a separate table(temp even) and then set up a query between this and other tables. BUT the bottom line is the purpose of the query.
 

Number11

Member
Local time
Today, 03:39
Joined
Jan 29, 2020
Messages
213
What exactly is the purpose of the query?
You have a list of account numbers and with each of those you want to determine XXX?
You could put those account numbers in a separate table(temp even) and then set up a query between this and other tables. BUT the bottom line is the purpose of the query.
to allow users to pop into a form a list of say 200 customer accounts and pull back details of any appointments, just like i would do create a table pop them in and run my query just dont want all users doing that so trying to work around it?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:39
Joined
Oct 29, 2018
Messages
13,261
Hi. You might be able to use the In() operator and a technique similar to this.
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 22:39
Joined
May 21, 2018
Messages
3,657
See if this helps. I use a class module to get the filter from a multi select listbox, but you could do a standard module if not good with classes. But the class should work on any listbox and takes a line of code.

The demo shows how to open a query and how to filter a form using the same listbox.
multiselect.png
 

Attachments

  • MultiSelectSimple.accdb
    632 KB · Views: 9

Users who are viewing this thread

Top Bottom