Month to find

syedadnan

Access Lover
Local time
Today, 12:18
Joined
Mar 27, 2013
Messages
315
Regards

I have a query having issue date like this 10 Nov 2013.

now i have to process 3 upcoming months bills .. say i want to show in query like this bill for Nov, Dec, Jan based on the issue date i mentioned earlier and the months to be find from the numeric month field like 3 i mentioned which mean 3 months ahead from issue date.
 
What is the actual data type of the billing date in the table?
 
What is the actual data type of the billing date in the table?

Thanks for the reply indeed

The data type for the billing date is date and time
 
The criteria in your query should be something like this:
>= StartDate AND <= StartDate + nMonths-ONEmonth
In order to calculate the StartDate + nMonths-1 take a look to the DateAdd() function
 
The criteria in your query should be something like this:
>= StartDate AND <= StartDate + nMonths-ONEmonth
In order to calculate the StartDate + nMonths-1 take a look to the DateAdd() function


Thanks for the reply and solution

I shall be glad if you kindly describe this in detail like startdate ? how i use this field and nmonth ? plus how to calculate 3 months next from current billing date..
 
As usually, is easier to provide advices than to do.

Attached is a small DB from where (I hope) you will be able to understand the technique.

Feel free to ask more.

Good luck !
 

Attachments

As usually, is easier to provide advices than to do.

Attached is a small DB from where (I hope) you will be able to understand the technique.

Feel free to ask more.

Good luck !

Thanks for the support but i am unable to get my solution.. repeatidly saying that i need months like Nov, Dec, Jan from single billing date as current and next three months to be produce from the month count field in query like 3 mean three months next.
 
And I give you exactly this.
First, fill the text box (top of form) with the number of months you wish to calculate.
Leave this text box blank in order to calculate for ALL months.

When you hit the button "Show Query" from any record, the query will filtered the records from the current month until the number of months specified in the text box (including the current month)

Of course that you can tweak this "general" code in order to fit your needs.
Try to understand what I doing then, for sure, you will be able to adapt it.
 
And I give you exactly this.
First, fill the text box (top of form) with the number of months you wish to calculate.
Leave this text box blank in order to calculate for ALL months.

When you hit the button "Show Query" from any record, the query will filtered the records from the current month until the number of months specified in the text box (including the current month)

Of course that you can tweak this "general" code in order to fit your needs.
Try to understand what I doing then, for sure, you will be able to adapt it.

Bunch of thanks for you..

Now i am telling you the picture,

I am preparing a school voucher, issue date is the current date taken from the system as =now(), .. ok then in my school the fee collection is for three months or for a querter in advance, now the situation is that with issue date i have to show something like this on fee voucher that fee for the month of Oct, Nov, Dec based on the issue date i have a field of months count like 3 for three coming months .. any idea now .. thanks again
 

Users who are viewing this thread

Back
Top Bottom