Hi J Denault, how is the database coming along?
To make sure the database opens on the same layout each time you open it you have two options, both under the File Options, 'File > File Options...'
You can either simply select a layout on the 'Switch to layout' options or you can specify a script to perform at startup and in that script have a Go to Layout script step.
Hope this helps
I would add that, although using startup script or File Options works, it SWITCHES from the opening layout to the layout specified. A file always opens on the the layout it was on when it was closed. What this means is that, even though it immediately switches to the specified layout, there can be a FLASH when it happens. And if the layout it was on when it closed happens to be one with aggregate data, many portals or complex graphics, it can be obviously annoying and downright SLOW!
When designing, I always return to the opening menu before saving my file for the last time. **
UPDATE: I always include layout switch in my opener script as well, of course, just in case. ** Just to clarify ... you cannot save a layout unless something has changed on it. So I make some small change (drag a field 1 px and then move it back exactly where it was). Then CTRL-S will save that layout as your opening one.
I stand corrected by myself! :smileyhappy:
I have always used scripted openers so I have never used File Options > Layout Switch and have always included the layout switch within the script. It appears that using the File Options Layout Switch activates BEFORE rendering of the layout so there is no flash or ghost (of layouts past).
So one should use File Options > Layout Switch instead of script and keep your Opener script for everything else (since you can use both upon file open).
Thank you Orlando and LaRetta,
That was an easy fix!
Orlando, database is coming along great. I added a couple scripts to print reports automatically without having to go to the certain layouts first. Guys at work are much happier with it than the previous Access version. Thank you again for all your help
I don't want to beat a dead horse, but under "File Options...", there is also a Close script. In the Close script, you can specify to return to the original layout before the file is closed. That way, when you open the file the next time, the original layout will display, and you will not need an Opening Script or Layout Switch.
I am assuming that you are talking in cases where the file is unserved correct? Unless there is some kind of undocumented feature here, I believe that in a served environment, regardless of what layout the closing script goes to, upon the next occurrence of the file opening, it will still remain at what layout it was when the file was served...
Thanks for the correction. I totally missed this was on a shared drive. The Startup script and/or Layout switch is the correct method. In other words, disregard my previous post. :-)