This code works fine when I need to embed a query. How do I assign a query to values in a drop down or buttons and load the chart? Maybe if-else condition? Like if I click a button, query 1 loads, for button 2, query2 etc. Thanks for the help. Here's the code:

I am struggling to get a stacked column / bar with this code. I do get a column chart only with the first value (transitions), and I need either a stacked column or a side-by-side column. Please help. This is the code:

<CODE>

<script>
var myDB = new ACCESSdb("Mydesktoppath\\Hcharts.accdb", {showErrors:true});
$(document).ready(function()
{
// $("#run").click(function()
// {
var jval = myDB.query($('#query').val(),
{HCScat : true}); //gets json format data


$('#container').highcharts({
chart: {type: 'column', style:{fontFamily: 'Arial'}},
subtitle:{text: "Sending Location"},
plotOptions: {series:{dataLabels:{enabled:true}}},
title: {text: "FTE Transitioned"},
credits:{enabled:false},
xAxis:{type:'category'},

series: [{color:"#409c8a",name:"Transitioned",
data: JSON.parse(jval)
}]
});

// });//end of click function

}); //end of ready function
</script>
</head>
<div id="container" style="min-width: 600px; height: 400px; margin: 0 auto"></div>
<textarea id="query" style="width:0px;height:0px; border-width:0px; border-color:#ffffff">
Select [Sending Location], Round(Sum([FTE Transitioned]),0) as [Transition], Round(Sum([FTE Reduction]),0) as [Reduction] From tblDatabase Group by [Sending Location]
</textarea>

</CODE>

===============
Result of the Query:
[["Australia",9,0],["Bangalore",430,409],["Dublin",136,49],["Limerick",63,34],["London",163,52],["Luxembourg",294,0],["Manila",6,0],["North America",284,76],["Singapore",12,2],["Switzerland",0,0],["Tempe",39,1]]
===============