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

Refreshing between Tabs 1

Status
Not open for further replies.

jabrony76

Technical User
Apr 23, 2001
125
US
Hi all,
I'm having a problem refreshing between tabs. I have a main form set up with demographics in the form header and then a Tab Control at the bottom with subforms in each tab. The problem that I'm having is based around 3 particular tabs (Admissions, HR, and Welcome Home)that are related (either with similar fields or through subforms) and share information between them.

The problem is that when I enter info into the Admissions Tab and then click over to the Welcome Home Tab, the data entered in the admissions tab just recently isn't showing up. I discovered that I have to close out the main form and re-open it to have this info show up. I have tried a macro to requery but i'm not sure if i'm doing it correctly. Where should this macro go? What Event Procedure should I have it run on? When I build the requery macro should I leave the Control Name blank? Or am i completely off base and is there an easier way to do this? Pleae Help! Thanks,
Andy M.
 
In the OnClick event of the tab page, place code like this:

TabPageName.Requery

That should do it. Joe Miller
joe.miller@flotech.net
 
Joe,
Thanks for the reply but that isn't working for me. Is it because I need to requery the subform that in on that tab? Each tab has a subform on it, not data directly on the tab itself. Where would I put the requery command for the subform and what would it look like?
Thanks,
Andy
 
in the same place, but you need to issue a requery to the subform name:

TabPageName.SubFormName.Requery

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top