Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Posts
    176

    Question Unanswered: Record set in Query window

    I have a record set variable which contains a particular one type of records.I would like to filter it our further under query editor and display its results in "Main query window". Under query editor if you give the record set variable as source for the query we face "Run time error 6, overflow", Any help from fellow users?

    We can filter the record set by another filter record set variable.But how to display the filtered record set in the main window?
    Why I want to display the results in query main window is that we can build a tool set to process these record set further.

  2. #2
    Join Date
    Jan 2014
    Posts
    46
    A folder can hold the results of your original query, then you can set up further queries on that folder / query set. Not sure if that helps.
    Don

  3. #3
    Join Date
    Jul 2011
    Posts
    176
    Thank you Don.
    In the query folder you can save only certain type of query.That too only a paticular query.I feel similar to query folder a variable recordset folder will be good.
    In my requirements I need to display various sets of recordsets frequently.

  4. #4
    Join Date
    Oct 2013
    Location
    Philippines
    Posts
    103
    Isn't the variable in the Query only for folders? Maybe, you can generate a folder for the recordset and use that folder to display the query.
    Last edited by mcmichael; 02-15-14 at 05:25.

  5. #5
    Join Date
    Jan 2014
    Posts
    46
    I was playing around with this concept, and I think a roundabout way to do this is to create a folder named "First Query Results". In the query editor under actions for the First Query, check "execute a script one time after the query is complete" and execute a script to clone recent query results and then move selected records to the First Query Results folder. You can then use that folder as the source for further queries (on the First Query results). You could get really fancy and continue this process with multiple folders and queries.
    Don

  6. #6
    Join Date
    Jan 2014
    Posts
    46
    I was using copying query results above, but is there an easy way to create a recordset folder other than defining all the field variables and updating the new record fields in a for-next loop?

  7. #7
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hello
    I may be off target here but is it not possible just to run secondary query based on original criteria plus new criteria. Original search term stored in global or static after user input dialog, then run first query. May be have a flag check field to mark records needed for further processing and run second query with same term ( global var) plus 1 in marked flag field? This is just one possible idea but would seem to be quite flexible. End result is always a displayable record set. Thinking as per car sample - find all blue cars for customer then tick off cars for shortlisting and run secondary query (with the 2 criteria) to print out units of interest. Copying records to folders is possible but I worry about writing and deleting records within database over long period with this method.
    Just my thoughts
    David

  8. #8
    Join Date
    Jan 2014
    Posts
    46
    "Copying records to folders is possible but I worry about writing and deleting records within database over long period with this method."

    From above, yes, so I discovered. Using my method of moving and copying is a database optimization nightmare. And I was only using about 20 records to test!

  9. #9
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Can you share a sample database for working on it. I like to find workaround for it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •