hello , i've in my system a search form which contains many tabs for each table i have in the database

for example (employee tab,departments tab....)

and seperated forms for the same tables to add recored from

what i want is

when i'm opening the employee form and press the search button which opens the search form that contains the search tabs
to open with specific tab selected , not the default one

hope it can be done

thanks in advance

Recommended Answers

All 3 Replies

Modify the constructor for the search form to take a parameter to tell it which tab to open and then use a switch block to handle the param value and open the right tab?

Quite a messy way to do it but would work.

Probably better to use an enum and to mark the tag with the enum, that way you can use a single method to find and activate the correct tab.

Less messy than using a switch statement.

Had a feeling you would know a cleaner implementation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.