tabcontrol (1 Viewer)

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
I have tabcontrol0, tabcontrol1, tabcontrol2 etc. On each control I have the specific forms. When a tabcontrol is changed ie. client using tabcontrol2 and clicks tabcontrol1 without completing certain requirements of tabcontrol2, the events in the main form on each tab does not respond to the changed tab. how do I access the action of the tabcontrols. attached copy with the tabcontrol.:banghead:
 

Attachments

  • tabs.jpg
    tabs.jpg
    64.5 KB · Views: 104

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
I cannot access any events on the tabcontrol. I cannot access any code for the tabcontrol. What do I need to do to access code and/or events on the tabcontrols.
See Photo.
 

Attachments

  • tabs.jpg
    tabs.jpg
    41 KB · Views: 89

jdraw

Super Moderator
Staff member
Local time
Today, 15:16
Joined
Jan 23, 2006
Messages
15,379
Please tell us about your business and database. What exactly are we dealing with. And post a zipped copy of your database -- remove anything personal/confidential first.

Did the link I suggested help at all?
 

Simon_MT

Registered User.
Local time
Today, 20:16
Joined
Feb 26, 2007
Messages
2,177
Strictly speaking these forms do not appear to be tab controls, from the first Image these look like Forms displayed as Tabbed Documents.

Simon
 

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
A pet motel. All types of pets are boarded and or groomed. The pet motel owners access the data via pet or owners name. I'll remove the files and attach an mty version.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 05:16
Joined
Aug 29, 2005
Messages
8,263
I cannot access any events on the tabcontrol. I cannot access any code for the tabcontrol. What do I need to do to access code and/or events on the tabcontrols.
See Photo.

The image shows a series of Forms in Tabbed view, so as such there will be no events for them. A tabbed form control will look like;

 

Attachments

  • Capture.PNG
    Capture.PNG
    31.7 KB · Views: 295

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
Owners has a push button that opens the Billing tab. When the customer has both tabs open (owners and billing) I need to know when the customer moves from the billing tab back to the owners. The customer must approve the Bill. As of now, the customer can click on owners without approving the bill and the bill will not be saved properly. I have tried everything to access the tab.
Thanks for your help.
 

Attachments

  • NewZip.zip
    398.4 KB · Views: 77

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
those are tab pages. The tab Control reference as tabcontrol0, tabcontrol1 etc,. I cannot access the events in the tabcontrol such as onchange etc. Maybe I should put the whole thing on tabcontrol0 and create pages. That would solve the problem.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 05:16
Joined
Aug 29, 2005
Messages
8,263
I've downloaded your DB and I can assure you you have NO Tabbed Controls in your DB. What you do have is a series of Forms in a Tabbed layout.

To detect when your user moves from one Form Tab to another you will need to use the Form's On Deactivate event, to detect when the user click on another form tab.
 
Last edited:

John Big Booty

AWF VIP
Local time
Tomorrow, 05:16
Joined
Aug 29, 2005
Messages
8,263
The button on form Owners has a simple Open Form action, nothing more.

 

Attachments

  • Capture.PNG
    Capture.PNG
    14.3 KB · Views: 251

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
I tried it. You are right. So it's called a tabbed layout. Thank you.
 

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
Another tabbed layout problem. At the deactivate - I want the user to return to the deactivated tab. the tabbed layout 1 has become active and I do not know how to reactivate tab 2 in the tabbed layout. Your help has been deeply appreciated.
 

John Big Booty

AWF VIP
Local time
Tomorrow, 05:16
Joined
Aug 29, 2005
Messages
8,263
In the On Deactivate event try;
Code:
Forms!YourFormName!SomeControlName.SetFocus
 

Beetle

Duly Registered Boozer
Local time
Today, 13:16
Joined
Apr 30, 2011
Messages
1,808
Calling these tabs is confusing the issue. They're just forms that happen to be in a tabbed layout. Trying to do some type of validation before the customer clicks from one form (tab) to the other form (tab) by using the Activate/Deactivate events will lead to problems in my opinion. You may end up actually having to use the Activate event of the first form to run your check and set focus back to the second form, but this would be a terrible idea because if the first form is ever opened without the second form being open then this would cause an error. Even if both forms are open, if something goes wrong the customer may find it impossible to set focus back to the first form at all.

If you want to force a customer to remain on a given form until certain circumstances are met, then it should be opened in Dialog mode and you should use an event that can be reliably cancelled, like Before_Update or Form_Unload, to do your validation. Personally, I wouldn't use tabbed layout for forms, and definitely not in a situation like yours where you need to control when and how a customer leaves the form.
 

MiriamLear

Registered User.
Local time
Today, 12:16
Joined
Dec 9, 2010
Messages
14
Didn't work. have to click on the tab, to see the setfocus. stays on tabcontrol1 instead of tabcontrol2 which as the setfocus. tx
 

Users who are viewing this thread

Top Bottom