Jump to content
Sign in to follow this  
thollowood

go to a layout based on date

Recommended Posts

Hello all, I'm an accidental techie looking for help. I am working with a database that has a separate layout for each month of the year (January2007, February2007 etc.) and I would like to create a script to use at opening that would take the user to the layout that corresponds with the current month. Something along the lines of, if the current month is June, go to June2007 layout. I have tried some options but clearly have no idea how to pull this one off. Thanks in advance.

Share this post


Link to post
Share on other sites

Your design seems a little flawed. What happens in 3 years? Will you keep creating a layout for each month of each year? This is not really recommended.

Now having one layout for each month is more manageable than one per each month/year.

Share this post


Link to post
Share on other sites

Even if it is set up as one layout for each month and new won't be created for each year. It would be so much easier to have 1 layout and and a date field, then isolate the records you want to see using a scripted search for the current month.

If you want to have a header that displays what months records you are viewing, within the find script just set a Global field with the Month for the last search performed.

Share this post


Link to post
Share on other sites

While I agree with mr_vodka here, you can do it with the script step:

Go To Layout -- Based on Calc

Then enter this as your calc.

MonthName(Get(CurrentDate)) & Year(Get(CurrentDate))

Share this post


Link to post
Share on other sites

Thanks for the advice. The original database is not my creation, I've been asked to see if I can "tweak" it. :giggle: I haven't used filemaker since.... wow, how about I NOT date myself that much... anyway thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.