Requerying a combo box on a tabbed subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a way to requery a combo box on a subform when I click on the tab for
its page. The combo box needs to show new data that was entered on a previous
subform (previous page of the tab control.)

The combo box is called cboGFConsCd. It is populated via a query called
qryConstituency.

The subform containing cboGFConsCd is called fsubGift.

I've been unable to come up with a procedure that will requery the combo box
or refresh fsubGift when I click on the tab for their page. Right now, I'm
relying on a command button to refresh the form, but this is not desirable.

Can I use the OnClick event for the Page to accomplish what I want?
Also, do I need to reference the Master form that contains the tab control
when I create the event procedure?

Any suggestions would be appreciated.

Thanks
 
The Change event of the tab control fires whenever you change tabs. The
first tab is number 0.

You shouldn't need to refer to the parent form for this to work.
 
Thanks for the help. I was able to use a Change Event code sample from the
Knowledge Base (Select Case of Page Index) to get the combo box to requery.
This method also solved a refresh issue I had on another page and enabled me
to eliminate a command button.
 
Back
Top