Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

requery a query

Status
Not open for further replies.

loneranger27

Programmer
Apr 22, 2003
94
US
Hi,

I have a form with 2 subforms on it. The user updates the second query and then presses the save button which updates a field in the first query. My problem is that I cant get the query to refresh automatically. I would like to code in a requery or refresh just for that subfom but I cant seem to get it.

I would appreciate any input you might have.
Thanks
 
HI

have you tried

MySubformControlname.Requery

where MySubformControlname is the name of your subform Control ?



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Yes I tried that it works within the subfrom where am working but it will not requery a subform on the main form.

I am not wanting to add a button to make the user refresh or requery on the main form. I want it to happen from the susubform.
 
HI

You are loosing me slightly

If you are in an event procedure of the sub form the Me.Requery shouuld requery that sub form

If you are in an event procedure of the main form then
MySubformControlname.Requery

should requery the sub form held in the control MySubformControlname of the main form

if you want to requery (say) subform B from subform A whre both A and B are on the mainform then

(from A) Parent.MySubFormControlB.requery should do it

Does that cover what you are trying to do?



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top