Tab Controls and subforms

G

Guest

I have a form with 5 tabs - one of the tabs has a subform holding financial
info about jobs. I am wanting to ask the user if they want to add standard
financial information to the job if no data has been entered when they click
on the finance tab. There is a field on the form called finaceId and I can
check if this value is null. If I place code in the subforms load or current
event these seem to be triggered even if the finance tab is not selected. I
also tried the activate event and page click event with no luck. I am now
pretty stuck for ideas
Any help gratefully recieved
 
R

Rick Brandt

PeterW said:
I have a form with 5 tabs - one of the tabs has a subform holding
financial info about jobs. I am wanting to ask the user if they want
to add standard financial information to the job if no data has been
entered when they click on the finance tab. There is a field on the
form called finaceId and I can check if this value is null. If I
place code in the subforms load or current event these seem to be
triggered even if the finance tab is not selected. I also tried the
activate event and page click event with no luck. I am now pretty
stuck for ideas
Any help gratefully recieved

Use the Change event of the TabControl (not of a page). In your code test the
Value property of the TabControl to determine which page was selected and only
run the rest of your code when the desired page is chosen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top