Swisher24 wrote:
Dim col1 As String = "sc_typname" '<-----Column to group by Dim MyCommand1 As New OleDbDataAdapter("select count(*) from flnme group by col1", conn1)
You are passing the name of the variable to the query string instead of the value of the variable, try the following:
Dim MyCommand1 As New OleDbDataAdapter("select count(*) from flnme group by " + col1, conn1)