Welcome! Log In Create A New Profile

Advanced

How do you execute a query when you click on a TAB?

Posted by Dan M 
I have a tab control with 3 tabs.

Each tab has a table on it.

Each table runs a query based on a search field the user enters.

I currently have the functionality working by allowing the user to click on the tab to display the tab with the table and then the user can click a button that will run the query to update the table.

How can I have the query run when the TAB is clicked?

(how do I activate the button click when the user clicks on the tab?) ... and then I can make the button invisible?

I know you can double click on a table and that will execute a button click ... but I don't see how to do that with a tab? (click on a tab and execute a button click)

Thanks ... Dan

Have you looked at ExecuteProcess(ButtonName,trtClick)?
Whoops, didn't read closely enough... I see your already using ExecuteProcess, what you need is what tab you are on.

In Whenever Modified of TabName, check the tabs ..Value property.

If TabName..Value = 1 Then
..ExecuteProcess(TabButton1,trtClick)
Else If TabName..Value = 2 Then
..ExecuteProcess(TabButton2Name,trtClick)
End
Art,

Thank you for your input. By letting me know to ...

1. use the ExecuteProcess command

2. use it in the "Whenever modifed section of the TAB..." control

was extremely helpful.

Then showing an example of how to implement the concept by using the IF ... THEN ... ELSE IF conditional statement gave me all I need to implement the concept and process.

You save me hours of time.

Thank you again ...

Dan
You're welcome, I'll send you my bill... ;-)
Stefan Bentvelsen
Re: How do you execute a query when you click on a TAB?
June 15, 2009 09:10AM
As an alternative you can also use

SWITCH TabName
..Case 1: ExecuteProcess(TabButton1,trtClick)
..Case 2: ExecuteProcess(TabButton2,trtClick)
... more cases ...
END
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: