Solved Tab and command button disabled or enabled? (1 Viewer)

lacampeona

Registered User.
Local time
Today, 18:07
Joined
Dec 28, 2015
Messages
392
Hello experts,

I have one problem.

I have a form with serveral tabs ( pages).

I want to force user to click Page2. If the user will not click the page 2 then the button1 is disabled. If he will click the page2 then the button1 will be enabled?

It is possible to force user to click specific tab on the form and in the same time command button goes enabled or disabled?

How can I make that? can someone show me some example?

thank you
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:07
Joined
Feb 19, 2013
Messages
16,607
you can't force a user to do anything, all you can do is stop them doing things until certain conditions are met. So you might disable all controls except the page2 tab (and its parent tab control) when the form is opened

in form open event (or perhaps current event if users can navigate to different records ) put code to disable the button e.g.

button1.enabled=false

in the page2 click event put

button1.enabled=true
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:07
Joined
Oct 29, 2018
Messages
21,468
Could you put the button on Page 2?
 

lacampeona

Registered User.
Local time
Today, 18:07
Joined
Dec 28, 2015
Messages
392
hello
yes i already try that..on open the button is disabled but then when i click page2 the button is not enabled..it is still disabled..


ohhh yes good ideaaa DB Guy ...maybe i have to delete the button and put the code to the page2
ok i will try also that
thank you both

hmmm
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:07
Joined
Feb 19, 2002
Messages
43,266
If the button is actually on page2, it should not be visible on any other page so since it is supposed to be active only if they are on page2, just leave it as always active.

If the button is visible on other pages, then it is not actually on page2.
 

lacampeona

Registered User.
Local time
Today, 18:07
Joined
Dec 28, 2015
Messages
392
Hello
yes i finally make it working,
thanks to all of you
 

Users who are viewing this thread

Top Bottom