how to invoke existing query as record source when coding? Thanks a lot!

Joined
Jul 5, 2005
Messages
22
Reaction score
0
hi guys,

i have built some queries named "query1, query2....", now i want to build a subform's record source based on those queries....my question is how to invoke those queries in coding?

for example, i code it as
...
Me.RecordSource = [query1]

but not work, did i use the wrong way "[query1]" to invoke ?

in additin, I know if i build the query in code, like
...
strQuery = "select * form students"
me.RecordSource = strQuery
...will be fine, whereas my boss required the previous way...

Thanks a lot!

Peter
 
Back
Top