Next month

J

jean

Hi

I have a text field [Text1] on a form and the value of this field is
09-11 where 09 is the year 2009 and 11 is the month (november).

I have also 11 other text field : from [Text2] to [Text12]

What I am trying to do is a relation between all these Text field

I need the formula to say that [Text2] = [Text1]+ whatever that would
gives the next mont "09-12" then [Text3] = [Text2] +?? so if somebody
as example put 10-04 in [Text1] , [Text2] = 10-05, [Text3] = 10-06 and
so on until [Text12] = 11-03

I know it should be something like = format (...... but I cannot
find the right syntaxe

thanks for helping
 
G

Gina Whipp

Jean,

Okay, let's back up here... Seems to me you are trying to use Access like
it was Excel on steriods and that is wrong. Can we get a little background
on what it is you are trying to do so we can make some suggestions? Tables,
fields and exactly what you are trying to track...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
J

jean

Jean,

Okay, let's back up here...  Seems to me you are trying to use Access like
it was Excel on steriods and that is wrong.  Can we get a little background
on what it is you are trying to do so we can make some suggestions?  Tables,
fields and exactly what you are trying to track...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm




I have a text field [Text1] on a form and the value of this field is
09-11  where 09 is the year 2009 and 11 is the month (november).
I have also 11 other text field : from [Text2] to [Text12]
What I am trying to do is a relation between all these Text field
I need the formula to say that [Text2] = [Text1]+ whatever that would
gives the next mont "09-12" then [Text3] = [Text2] +??  so if somebody
as example put 10-04 in [Text1] , [Text2] = 10-05, [Text3] = 10-06 and
so on until [Text12] = 11-03
I know it should be something like = format (......     but I cannot
find the right syntaxe
thanks for helping- Hide quoted text -

- Show quoted text -

I know it looks like I am doing something like Excel, but I just need
the formula.

I don't want to go with a query or table.

User put year-month in the firs Text field and the 11 others follow.
User print the report and it is finish. Next time user enter another
avlue, print the report and it is finish. Kind of simple.

Just need the formula

Thanks for helping
 
J

John W. Vinson

Hi

I have a text field [Text1] on a form and the value of this field is
09-11 where 09 is the year 2009 and 11 is the month (november).

I have also 11 other text field : from [Text2] to [Text12]

What I am trying to do is a relation between all these Text field

I need the formula to say that [Text2] = [Text1]+ whatever that would
gives the next mont "09-12" then [Text3] = [Text2] +?? so if somebody
as example put 10-04 in [Text1] , [Text2] = 10-05, [Text3] = 10-06 and
so on until [Text12] = 11-03

I know it should be something like = format (...... but I cannot
find the right syntaxe

thanks for helping

I agree with Gina that these fields should not be stored anywhere in your
database; but if it's just labels on a Report, set the Control Source of Text1
to

=Date()

Set the control source of Text2 to

=DateAdd("m", 1, Date())

through Text12

=DateAdd("m", 11, Date())

Set the Format property of all twelve textboxes to

"yy-mm"
 
J

jean

John has given you the expression to use if Text 1 defaults to the current
month, but if the user can enter a month other than the current one in Text1
the expression for Text2's ControlSource would be:

=IIf(IsNull([Text1]),"",DateAdd("m",1,CDate([Text1])))

for Text3:

=IIf(IsNull([Text1]),"",DateAdd("m",2,CDate([Text1])))

and so on.

Ken Sheridan
Stafford, England




[quoted text clipped - 31 lines]
- Show quoted text -
I know it looks like I am doing something like Excel, but I just need
the formula.
I don't want to go with a query or table.
User put year-month in the firs Text field and the 11 others follow.
User print the report and it is finish.  Next time user enter another
avlue, print the report and it is finish.  Kind of simple.
Just need the formula
Thanks for helping

Thanks Ken that is exacly what I was looking for

Have a nice day
 

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

Top