Hi Martin
A few comments that might help you get started.
First, use the grouped query to get the list of unique values for you thematic. This also gives you an idea of the number of records.
Then create a similar sized array of Symbols and assign symbols to each of them. You can also use a String array as you will combined it all together in a string later.
Finally, do a loop around the number of unique values and build string where you combine the string with the symbols:
For i = 1 To Ubound(arrStrings)
If i = 1 Then
sCmd = Chr$(34) + arrStrings(i) + Chr$(34) + " " + arrSymbols(i)
Else
sCmd = sCmd + ", " + Chr$(34) + arrStrings(i) + Chr$(34) + " " + arrSymbols(i)
End If
Loop
And now you can use this string in combination with the rest of the Shade statement in a Run Command statement:
Run Command "shade window 3044 1 with SOFTWARENAME values " + sCmd + " default Symbol (40,0,12)"