Remember Tab After Close

BrianB75

Registered User.
Local time
Yesterday, 23:13
Joined
Aug 27, 2004
Messages
43
I have a main form set up with 4 tabs within. Two of the tabs have buttons that close the form to open a new one. When that open form is closed the system returns back to the main form but it resets itself to show the first tab, no matter which tab was open when the main form was closed.

Is there a way, besides opening the new window without closing the main one, of setting it up to remember which tab was open when the form was closed?

The reason the main form is closing is to update the table attached to the form with any new data added/changed. Is there another way of updating the data in the table without closing the form? This would solve the above problem.

Along a similar line, I also have another form that lists search results and allows the user to double-click on a record to pull up a detail screen. This closes the search screen and when the user returns to that screen it returns to the top of the list. Same question as above, is there a way to save where the user was at in the search form?


Sorry for the long post. Thanks in advance. :)
 
If you want to save the control that it was on, you can do it in a few different ways.

1. On close save the tab name into the main tab control's TAG and then in the ON Open set focus based on the info in the tag

2. Create a table to store settings and use Dlookups when opening the database to retrieve the settings and then set them based on those

3. use an INI file to store the info (not the best option as it takes more coding to work)
 
Remember Location

I amn't sure if you can remember the tab but basically it is probably the same as this.
Whe you click to open the other form, send as part of the open, the current record ID or tab you were in to the new form, when you go back to the previous form you can open at that record or set focus to the Tab.
 
Okay, I set the Tag on the tab to the name of the tab it was at on close but for the life of me I cannot figure out how to set the focus. I tried the "GoToControl" option in the macro for the form but no luck.

I am probably missing something simple here....:(
 
To set the focus on the tab, Me.PageNameHere.SetFocus
 
Sweet!!!:)

Thank you both for the quick replies. This worked perfectly!!!
 

Users who are viewing this thread

Back
Top Bottom