I found the following to be an issue
Access 2007 was throwing "Run-time error '3075' because it was having an issue with the single quotes so I change it to this:
Also remember that the above "type" is the name of the column from his database, you could change that to a variable or hard code in your database column name that you are using to calculate medians.
Code:
WHERE type= '" & pgroup & "'
Access 2007 was throwing "Run-time error '3075' because it was having an issue with the single quotes so I change it to this:
Code:
WHERE type = """ & pgroup & """
Also remember that the above "type" is the name of the column from his database, you could change that to a variable or hard code in your database column name that you are using to calculate medians.