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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top