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

Form Not Refreshing After Db Migrated To Sql 2k8

Status
Not open for further replies.

HeliosRex

Programmer
Nov 23, 2011
1
US
We have an application that has an outer form, which will open 2 sub-forms. Both the sub-forms have the same exact query as their source, but their layout is different from each other. Sub-form# 1 is in data view format with the control on the first row at the time of it opening. Sub-form# 2 is in form view with columns from the highlighted row from sub-form#1 laid out around the form in a custom design and pattern. Now, when any field is changed in sub-form#2, the change is not automatically reflected in the corresponding row and column of sub-form# 1. As soon as you hit F5, the change is reflected in sub-form#1. But we would like this to be reflected immediately. Is there any event at the form level that can be used to trigger these changes? In other words, is there a form level event that I can use in sub-form#2 whenever something is changed in it to refresh sub-form#1?

Earlier, we had this application in Access (both front-end and back-end) which was working just fine. This issue has started ever since we moved the back-end to SQL Server, which obviously is not as tightly bound to Access front-ned as Access back-end.

- Helios
 
I'd use the AfterUpdate event procedure of subform2.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya HeliosRex . . .

In the [blue]AfterUpdate[/blue] event procedure of subform2, try:
Code:
[blue]   Forms![purple][b]MainformName[/b][/purple]![purple][b]subform1Name[/b][/purple].Form.Requery[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top