problem to assign a query

collinm

Registered User.
Local time
Today, 15:26
Joined
Apr 20, 2006
Messages
14
hi

i created a query named: qryTest

on a form, i put a subform/subreport (name: resultQuery)

i have also a button

when i click on the button, i would like to run my query: qryTest and i want to display the result to my component: resultQuery

i tried

resultQuerysourceobject = currentdb.querrydefs("qryTest");

i get error syntax....

any idea?

thanks
 
collinm said:
hi

i created a query named: qryTest

on a form, i put a subform/subreport (name: resultQuery)

i have also a button

when i click on the button, i would like to run my query: qryTest and i want to display the result to my component: resultQuery

i tried

resultQuerysourceobject = currentdb.querrydefs("qryTest");

i get error syntax....

any idea?

thanks

Hey Collin,

I hope I'm following what your asking but give this a try:

Me.ResultQuery.SourceObject = "qryTest"

HTH,
Shane
 
ShaneMan said:
Hey Collin,

I hope I'm following what your asking but give this a try:

Me.ResultQuery.SourceObject = "qryTest"

HTH,
Shane
i get the error

Run-time error '3011':

the ms Jet database engine could not find the object '~sq_cfrmT~sq_cResultQuery'.
Make sure the object exist and that you speel its name and the path name correcttely
 
collinm said:
i get the error

Run-time error '3011':

the ms Jet database engine could not find the object '~sq_cfrmT~sq_cResultQuery'.
Make sure the object exist and that you speel its name and the path name correcttely

Did you do what the message says? You need to double check and see if you have spelled everything correctly and that you have your names right.
 
ShaneMan said:
Did you do what the message says? You need to double check and see if you have spelled everything correctly and that you have your names right.

ya because i use completion.....

i tried with a list:

lstResult.RowSource = "qryComparaison"
that work fine...... but i search a way to do it with a subform/subreport component.....

any idea?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom