I've got a very cookie-cutter database (very similar, very repetitive queries) which go into one modular report (ie they all return the same things with different criteria).
There will be ~100 of these queries so I'm using a combo box to display the queries, which get sent to the report (via OpenArgs
).
I need to generate a list of queries (just the names) that I have in my project. I'd like to have the control source of the combo box be this list of queries.
It doesn't matter if I have to do a string concatenated Value List
source or a Query/Table
source type, the only thing that matters is that the bound column contains the "qryName"
What I have so far:
For Each qry In CurrentDb.QueryDefs
list = list & ";" & """" & qry.Name & """"
'String in the form "qryName";"qryAnotherQuery";"qryNextQuery"
Next
but apparently there's a ~2000 character limit on Value Lists, so if I have a lot of queries I can't use a value list? Note also: qry.Name
will return something like "~sq_cTableName" as well, not just my queries.. which is a problem. I'd like just queries.
Any ideas? I'm open to other ways of showing this information without a combo box as well, as long as I can send the query name to the OpenArgs of my report.