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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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