Query running in a subform

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I have a form based on a query witht the following code in the query

Like "*" & [forms]![frmSearchProducts]![ProductSearch] & "*"

I have now added frmSearchProducts into frmORder as a subform. what do
i have to do to the code to make sure works

Can not remebre how to code it

Thanks
 
Hi Simon,

on the AfterUpdate event of ProductSearch, requery the subform. for
instance, if you are in the code behind the form for which frmORder is a
subform:

'~~~~~~~~~~
me.frmORder.Requery
'~~~~~~~~~~



Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Crystal:

Sorry to bring this up, but shouldn't that really be:
Me.frmORder.FORM.Requery

The subform container itself doesn't have a requery method but the form does.

--
Bob Larson
Access MVP
Access World Forums Administrator
Utter Access VIP

Tutorials at http://www.btabdevelopment.com

__________________________________


strive4peace said:
Hi Simon,

on the AfterUpdate event of ProductSearch, requery the subform. for
instance, if you are in the code behind the form for which frmORder is a
subform:

'~~~~~~~~~~
me.frmORder.Requery
'~~~~~~~~~~



Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*



I have a form based on a query witht the following code in the query

Like "*" & [forms]![frmSearchProducts]![ProductSearch] & "*"

I have now added frmSearchProducts into frmORder as a subform. what do
i have to do to the code to make sure works

Can not remebre how to code it

Thanks
 
Hi Bob,

actually, Requery works with the subform object too... it shouldn't but
it does <smile>

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 

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

Back
Top