Ugh!!!
Okay I figured it would be easy enough to move the results of the loop from the Immediate Window and into a RecordSet
At which time I could simply set the RowSource of the combox to the Rs.
Well - here I am so that should tell you how that went...
So now my question becomes - how can I store the results of the loop so I can use those results as the RowSource for my ComboBox.
Below is only the latest variation of my effort to use a RecordSet - I've tried both setting the Rs before and after the loop - Not happening
Can this even be done - ??
The errors I'm getting back are either Foo is not a valid table name (if I use quotations) or that July 2020 not being a valid table name.
Code:
Dim Boo As Integer
Dim Counter As Integer
Dim Db As Database
Dim Rs As Recordset
Set Db = CurrentDb
Boo = Month(Date)
For Counter = Boo - 7 To Boo - 1
Foo = Format(DateSerial(2020, 1 + Counter, 1), "mmmm yyyy")
Next Counter
' Set Rs = CurrentDb.OpenRecordset(Foo, dbOpenSnapshot)
Set Rs = CurrentDb.OpenRecordset(Foo, dbOpenDynaSet)
Debug.Print Rs