In a form in my program, I may need from 1 to 7 listboxes based on the days of the week depending on how many the user has selected in an earlier form. For each listbox, I need to create a temporary table to hold text data that is to be drag-n-dropped from one table to another.
I would like to create a Recordset for each listbox that would hold the records of each table. I was thinking along the lines of rst_temp1, rst_temp2 etc.
A query is returning the number of days and their names to the form. With the number of days, I was thinking [this is where it got sticky!] of concatenating a string " rst_temp" with an integer index (1,2,3) for a DIM Recordset statement within a FOR loop.
Several attempts in various ways and looking around leads me to the feeling that I don't have a snowballs chance ….. But I would like one of you experienced folks to confirm that another approach is warranted, and perhaps what that approach might be.
At this point in the mental contemplation of the design, I am thinking of DIMing all the Recordsets, Tabledefs, etc. but somehow leveraging the maximum number of days to limit activating (SET) them all. Perhaps I could have a 7-clause CASE Statement within a FOR loop limited by the count returned of selected days….
Any thoughts will be greatly appreciated!
Regards, Sorrells
I would like to create a Recordset for each listbox that would hold the records of each table. I was thinking along the lines of rst_temp1, rst_temp2 etc.
A query is returning the number of days and their names to the form. With the number of days, I was thinking [this is where it got sticky!] of concatenating a string " rst_temp" with an integer index (1,2,3) for a DIM Recordset statement within a FOR loop.
Several attempts in various ways and looking around leads me to the feeling that I don't have a snowballs chance ….. But I would like one of you experienced folks to confirm that another approach is warranted, and perhaps what that approach might be.
At this point in the mental contemplation of the design, I am thinking of DIMing all the Recordsets, Tabledefs, etc. but somehow leveraging the maximum number of days to limit activating (SET) them all. Perhaps I could have a 7-clause CASE Statement within a FOR loop limited by the count returned of selected days….
Any thoughts will be greatly appreciated!
Regards, Sorrells