• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 57
  • Last Modified:

Webpage to always show last 2 months

I have a webpage that pulls data from access. I want it to display 3 columns for Jan and 3 columns for feb. Once March 1st hits, I want  feb to replace Jan and march to appear on the webpage.....I have attached a word file that might might help picture it. I just don't know how to move the last month to the left of the page and add the new month on the right on the 1st day of the month...

Any help appreciated..
0
j8547
Asked:
j8547
  • 2
1 Solution
 
PatHartmanCommented:
There is no document attached but to do what you are asking, you would use criteria.  However, we need a clearer definition of what exactly you want to see.  Are you saying that you want to see the "current month" which is January plus the next month?
0
 
j8547Author Commented:
so right now it would display dec and Jan. Feb 1st it would display Jan and Feb details and so on....
jobs.docx
0
 
PatHartmanCommented:
So you want it to display the current month and the previous month?  Getting a firm description of your requirements shouldn't be this difficult.  Will you be looking for future data so that the date range TODAY is Dec 1, 2017 - Jan 31, 2018 or is from the first day of the previous month to the current day of the current month?  that would make the date range Dec 1, 2017 - Jan 10, 2018 today and tomorrow it would be Dec 1, 2017 - Jan 11, 2018.

Option 1:
Where YourDateField Between DateSerial(Year(Date()), month(Date()) - 1, 1) And DateSerial(Year(Date()), month(Date()) + 1, 0)
Option 2:
Where YourDateField Between DateSerial(Year(Date()), month(Date()) - 1, 1) And Date()
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now