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

How to update graph by changing data values displayed in the subform

Status
Not open for further replies.

Jawad77

Programmer
Dec 23, 2004
41
US
I have a "mainform" that has a tab control in its header. One of the pages of the tabcontrol has a graph on it. The data values for the grpah ( 4 columns) are displayed in the detail section of my "subform" that is embedded in the detail section of my main form. I like to update my graph every time I change the data values in one of the columns.

The name of my main form is "mainform"
The name of the subform is "subform"
The name of the subform control is "subformctl" .... Its source object is "subform"

I wrote this code on after update event of the text box (RP_tbx) displaying one of the columns' data values:

Private Sub RP_tbx_AfterUpdate()

DoCmd.Requery "GrpInbound"

End Sub

This code is attached to the subform.
Where "GrpInbound" is the name of my grpah object. But It doesn't work. It only works when it's attached to my main form which has the tab control in its form header with a graph embedded in one of the pages of its tab control.



Could you please tell me the right syntax in this case to update my graph.

Thanks a lot in advance

Jay


 
You may try something like this (typed, untested):
Me.Parent.SetFocus
DoCmd.Requery "GrpInbound"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top