If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Return all dates within a range
I think you're still misinterpretting Karl's advice. Nowhere did he suggest
creating a table with dates in it. What he suggested was to create a table named CountNumber, with one Long Integer field CountNum in it. CountNum would contain numbers 1, 2, 3, 4, etc up as high as you like. (It may be simplest to create this in Excel and import it into your database) Then, he suggested to create a query: SELECT CVDate([Enter start date])+[CountNUM] AS [My Dates] FROM CountNumber WHERE (((CVDate([Enter start date])+[CountNUM])=CVDate([Enter end date]))); Run that query, and you'll be prompted for Start and End dates. As long as the difference between the Start and End dates is not more days than you have rows in the CountNumber table, you'll get back 1 row for each day. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Joe" wrote in message oups.com... Thanks Karl and Doug, Even though it bugs me to not be able to write code to solve this problem, I'll create a permanent table with a few years worth of dates. I appreciate your help. |
|
Thread Tools | |
Display Modes | |
|
|