How to pass group key value to SQL statement

jrcai

New Member
How can I pass getGroupKey() value to a SQL statement under its group. I tried this in Function ObtainSelectStatement() As String:

ObtainSelectStatement = "SELECT order from orders where order_date = '" & getGroupKey() & "'"

where getGroupKey() is date type. I got illegal use of variable error.

Appreciate your help!


Jeff
 
Top