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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery SubForm from Main Form 1

Status
Not open for further replies.

WingandaPrayer

Technical User
May 15, 2001
152
On my main form I am entering details which will change certain fields within the SubForm.
I've tried Me.qryName.Requery on the MainForm LostFocus(on a particular field which has new details which should change the query in the SubForm.I've also tried on AfterUpdate,OnChange on this field.
Doesn't change!!!
Only after I go into a new record.
I would like the requery to show will I am still entering details on the original record.
Any help
What's the basic thing I'm not grasping.

Thank you

David
 
Just write this code on which ever event u think will be suitable

DoCmd.Requery ("subformname")

Hope this will solve ur problem.

Cheers!
Aqif
 
Aqif,

Using
DoCmd.Requery ("subformname")
requeries but returns to a new record.

This is what I would like.

I have 10 fields in the Main form and 2 in the sub form(based on a query).

When I enter details in Field 7 I want the subform to requery with the main form remaining in order to enter details in fields 8. 9. and 10 before I go to a new record.

Thanks,

David
 
Dear David:

U mean that when u requery ur parent form comes to new record or ur subform? If u could send me the file i'll be happy to look at it.

Cheers!
Aqif
 
Dear David:

I have checked by creating a parent and its subform. And i have written requery code behind a button. In my case it just requeries the subform and doesnot goes to new recorx on either of the form.

Cheers!
Aqif
 
Aqif,

I'm still doing something wrong(who knows what).

Instread i've used Me.Recalc works fine

Thanks for your time.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top