A family of Microsoft relational database management systems designed for ease of use.
Hum, that behavior does not seem correct?
If your set startFromScratch = True, then you should only see your tab and thus no need to have some switch occur.
You can download + try my sample here:
http://www.kallal.ca/Ribbon/ribbon.htm
Launch the application. If you close the form, you see the main form re-appear. However, if you re-launch the form (with a start from scratch = true), then the main (in fact all) tabs are hidden, and the only one you see is the current ribbon for the given form.
So, I not sure why your start from scratch is working differently, but you should not need nor worry about or even have a different tab that you want to switch back to.
And it is possible that I miss reading your question here.
There is no question that if you have more than one tab, launch another form, and return back, the first tab will be highlighted. This behavior has been standard for the last 3 versions of Access (since 2013 is RTM), and thus it worked this way for a considerable amount of time.
In 2010 and now 2013 you can use VBA code to "switch" or change the active tab, but this feature is not available in 2007. However, if using start from scratch, then your ribbon will in most cases only have one tab anyway. I suppose if you have (or need) more than one tab for the given form's custom ribbon then I would suggest further customizing of the ribbon that the preferred tab is the first one. As pointed out, after 2007, you can use code to switch the active tab, but not in 2007.
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada