Increasing Months

  • Thread starter Thread starter jeanulrich00
  • Start date Start date
J

jeanulrich00

Hi

Here is a simple question and I cannot find the answer.

On a report I have a text box [Text301] and when display I see
Fev-07

I would like to add something like 35 other text box so month would
increase by 1

What could be the formula for [Text302] to display Mar-07 or Mar
2007. The formula should be issued from [Text301]

Then [Text303] related to [Text302], [Text304] related to
[Text303], .......

So the day I change [Text301] for let say Apr-08 [Text302] would give
me May-08 [Text303} would be Jun-08, etc...

I dont realy care with the format; it can be Mar 08 or Mar-08 or
Mar-2008 or Mar 2008

thanks
 
Assuming that the data in [Text301] is Date/Time and not something that looks
like a date in a text field:

Format(DateAdd("m",1, [Text301]),"MMM-YY")
Format(DateAdd("m",2, [Text301]),"MMM-YY")
Format(DateAdd("m",3, [Text301]),"MMM-YY")
Format(DateAdd("m",4, [Text301]),"MMM-YY")

and so on for each field as needed.
 
You are committing spreadsheet as we say here. And in addition, controls
with meaningless names such as Text301 are poor practice. How will you ever
know what they represent a month from now?

What is it that you are trying to do and what is the table structure?
 
You are committing spreadsheet as we say here. And in addition, controls
with meaningless names such as Text301 are poor practice. How will you ever
know what they represent a month from now?

What is it that you are trying to do and what is the table structure?


Here is a simple question and I cannot find the answer.
On a report I have a text box [Text301] and when display I see
Fev-07
I would like to add something like 35 other text box so month would
increase by 1
What could be the formula for [Text302] to display Mar-07 or Mar
2007. The formula should be issued from [Text301]
Then [Text303] related to [Text302], [Text304] related to
[Text303], .......
So the day I change [Text301] for let say Apr-08 [Text302] would give
me May-08 [Text303} would be Jun-08, etc...
I dont realy care with the format; it can be Mar 08 or Mar-08 or
Mar-2008 or Mar 2008

Hi what I want to do is using those [Text301] as a label

I have a table "T-Period" containing 2 fields "PeriodNo" text field
00, 01, 02, 03 and so on until 35
and "PeriodName" Feb-07, Mar-07, Apr-07 ... and so on until Dec-09

When I produce a report I have to show all the 35 periods but for as
the user is aloud to decals period as much as 3 period. I have to show
38 periods and the last 3 are not included in the "T-Period" table

Example we receive a bill in the month of january and this bill will
be paid only 3 months after so I have to show that the money will be
needed for the month of april

For the first 35 i can use formula like dlookup ("field", "table",
"criteria") and it is easy 9just change the criteria) but for the last
3 "columns" I need another formula because they are not included in
the table and cannot be added b ecause a pivot query and some other
reasons.

This application will be used on a lot of project so I have to
automated it

thanks
 
Hi

Here is a simple question and I cannot find the answer.

On a report I have a text box [Text301] and when display I see
Fev-07

I would like to add something like 35 other text box so month would
increase by 1

What could be the formula for [Text302] to display Mar-07 or Mar
2007. The formula should be issued from [Text301]

Then [Text303] related to [Text302], [Text304] related to
[Text303], .......

So the day I change [Text301] for let say Apr-08 [Text302] would give
me May-08 [Text303} would be Jun-08, etc...

I dont realy care with the format; it can be Mar 08 or Mar-08 or
Mar-2008 or Mar 2008

thanks

You can set the control source of each textbox to

=DateAdd("m", 1, [Text301])

using 1, 2, 3, 4, ..., 35 in each textbox. Set the Format property of each
textbox to

mmm-yy

to display (e.g.) Mar-07.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top