Forgive me for being so thorough. I try to be because I am sure there are people who know less than me and I try to make it easier to understand what is going on when viewed later.
In Excel there is a formula END OF THE MONTH or EOMONTH(). One is able to pass a cell's value through it and count how many months ahead or behind from that date. The examples of how that works is:
For month 12/3/2002 last day: eomonth(12/3/2002,0) spits out: 12/31/2002
For Current Month’s last day: eomonth(today(),0) spits out last day of current month
For Last day of month 12 months ago: eomonth(today(),-12) Spits out last day of 12 months ago’s month
For first day of next month: eomonth(today(),0)+1 Spits out first day of next month
And so on….
Upon looking through the forum, I did see something that described what I was looking for but when I used it, it didn’t seem to work. It seems that there isn’t a stock formula in Access that does this already and I agree with their approach to the problem which was to make a formula like the excel formula. For the sake of example, I will just call this formula eomonth()
I would like to do something like this in a query in the criteria box. I want my query to only show records left in this month. I envision that I could plug in <=eomonth(date(),0) in the DueDate field and have it only show those records in this month. Please let me know if that is how I should write the formula in the criteria. I think that that is right.
If you could please tell me how and where I would put this formula. I think I should just put it in a regular madule but should it go in a class module? I really don’t know the difference. If you have a different approach or thought on this please let me know, I am all eyes.
I am sorry, I am self taught in Access and sometimes I feel like I have a box with just half the puzzle pieces. I mean I talk the lingo like “passing variables” instead of “plugging in” but I feel like I learned everything piece meal and I ask questions of a novice sometimes. For instance I know what a module is persay but have no clue why it would necessarily be a class module. I also should figure out how to create and refer to global variables and also how to declare them but I am sure that will come some other time. Thanks in advance.
Again, the thread i read seemed to be the right approach but it seemed like the author and the mentor (answerer of the thread) were making assumtions of their knowledge and that they made a mistake and corrected it. I couldnt get it to work for myself. In the end apparently the author got it to work but for me there remains some ambiguity. :banghead:
In Excel there is a formula END OF THE MONTH or EOMONTH(). One is able to pass a cell's value through it and count how many months ahead or behind from that date. The examples of how that works is:
For month 12/3/2002 last day: eomonth(12/3/2002,0) spits out: 12/31/2002
For Current Month’s last day: eomonth(today(),0) spits out last day of current month
For Last day of month 12 months ago: eomonth(today(),-12) Spits out last day of 12 months ago’s month
For first day of next month: eomonth(today(),0)+1 Spits out first day of next month
And so on….
Upon looking through the forum, I did see something that described what I was looking for but when I used it, it didn’t seem to work. It seems that there isn’t a stock formula in Access that does this already and I agree with their approach to the problem which was to make a formula like the excel formula. For the sake of example, I will just call this formula eomonth()
I would like to do something like this in a query in the criteria box. I want my query to only show records left in this month. I envision that I could plug in <=eomonth(date(),0) in the DueDate field and have it only show those records in this month. Please let me know if that is how I should write the formula in the criteria. I think that that is right.
If you could please tell me how and where I would put this formula. I think I should just put it in a regular madule but should it go in a class module? I really don’t know the difference. If you have a different approach or thought on this please let me know, I am all eyes.
I am sorry, I am self taught in Access and sometimes I feel like I have a box with just half the puzzle pieces. I mean I talk the lingo like “passing variables” instead of “plugging in” but I feel like I learned everything piece meal and I ask questions of a novice sometimes. For instance I know what a module is persay but have no clue why it would necessarily be a class module. I also should figure out how to create and refer to global variables and also how to declare them but I am sure that will come some other time. Thanks in advance.
Again, the thread i read seemed to be the right approach but it seemed like the author and the mentor (answerer of the thread) were making assumtions of their knowledge and that they made a mistake and corrected it. I couldnt get it to work for myself. In the end apparently the author got it to work but for me there remains some ambiguity. :banghead: