tabs on change

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

Guest

I have Reservationfrm with tabCtrlReservations. Reservationfrm has a subform
Jobfrm with with tabControlInvoice.

I want to prevent movement away from tabControlInvoice should the user click
on a tab of tabCtrlReservations when conditions are met.

Can/will someone show me the way?

Thanks in advance.
 
In the tab control's On Change event (not the tab page itself but the overall
control), put something like:

If WhateverCondition = Whatever Then
tabControlInvoice.SetFocus
End If

Since I don't know your exact conditions or control names I can't give you
exact specifics, but if you run into problems figuring that out post back.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Thanks for the reply.

My user is on Reservationfrm!Jobfrm tabControlInvoice and clicks on the
Reservationfrm tabCtrlReservations. That's where I want to go back (upon
condition) to tabControlInvoice.

I have 10 tabs on tabCtrlReservation and 4 tabs on tabControlInvoice.

I don't want the user to move away from the current tab (on
tabControlInvoice) to tabCtrlReservation, subject to the condition.

Help!
 
Without seeing the exact conditions and control names I can't give you exact
code. I already gave you the base which is what would work but you would
have to substitute the correct names.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Thanks again.

Reservationfrm contains a tab control named tabCtrlReservations.

On that tab control is a subform named Jobfrm which is on a tab control
named tabJob.

On Jobfrm is a tab control named tabControlInvoice.

On that tab control is a subform named Laborfrm which is on tabLabor.

While the focus us on Laborfrm, user should be unable to leave the tabLabor
until conditions are met. The condition test is not an issue for me, the code
to stay at tabLabor is. That code should be in Laborfrm's onChange event --
I think.

Does this clarify my issue?
 
Back
Top