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

Startbeitrag von Dan M am 13.06.2009 22:00

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

Antworten:

Have you looked at ExecuteProcess(ButtonName,trtClick)?

von Art Bonds - am 13.06.2009 23:44
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

von Art Bonds - am 14.06.2009 00:14
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

von Dan M - am 14.06.2009 14:03
You're welcome, I'll send you my bill... ;-)

von Art Bonds - am 15.06.2009 03:50
As an alternative you can also use

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


von Stefan Bentvelsen - am 15.06.2009 07:10
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.