The problem is in this line:
PieChart.SeriesCollection(i).Interior.Color = rst![exp_color]
exp_color is a string that contains the name of the function with arguments. VBA isn't going to evaluate
that function into a color number unless you tell it to. It just considers the field value text like "Hello". So the code is trying to set the color to the literal character set "RGB(#,#,#)" which doesn't make sense. Actually, the chart color properties are pretty versatile, in that they do accept numbers and some strings, but those strings have to be sensible color names like "Red", etc. It won't know what to do with a name like "RGB(#,#,#)"
If you weren't using a recordset and tried to do this:
PieChart.SeriesCollection(i).Interior.Color = RGB(255,0,0)
That would work fine, because without quotes the RGB function would be evaluated. However, this is what your code is essentially doing by supplying the value from a recordset text field:
PieChart.SeriesCollection(i).Interior.Color = "RGB(255,0,0)"
There are a few things you can do:
1. Modify your table to include the actual color number instead of an RGB function string.
2. If you want to keep the individual red, green and blue components in the table, split them into three numeric fields and change the line I referenced above to:
PieChart.SeriesCollection(i).Interior.Color = RGB(rst![exp_color_R].Value,rst![exp_color_G].Value,rst![exp_color_B].Value)
3. Keep your table structure exactly the same and change your code to:
PieChart.SeriesCollection(i).Interior.Color = Eval(rst![exp_color].Value)
The Eval() function takes a string that indicates the name of a function and evaluates it.
I just saw your recent post about understanding the string thing, not sure how I missed it the first time. Your last question about a function that will take the quotes off is essentially option 3 above.