A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

report expression



 
 
Thread Tools Display Modes
  #1  
Old July 18th, 2007, 05:38 PM posted to microsoft.public.access.reports
Alylia
external usenet poster
 
Posts: 7
Default report expression

I would like assistance on how to extract information on a report from a
"number of days" field based on the following:

first 30 days
between 30 and 60 days
after 60 days

Please note that the datatype of the field is number.
  #2  
Old July 18th, 2007, 06:40 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default report expression

Alylia wrote:

I would like assistance on how to extract information on a report from a
"number of days" field based on the following:

first 30 days
between 30 and 60 days
after 60 days

Please note that the datatype of the field is number.



There are several ways to do that kind of thing. Which one
is appropriate to your situation depends on what you are
trying to accomplish.

--
Marsh
MVP [MS Access]
  #3  
Old July 18th, 2007, 07:34 PM posted to microsoft.public.access.reports
Alylia
external usenet poster
 
Posts: 7
Default report expression



"Marshall Barton" wrote:

Alylia wrote:

I would like assistance on how to extract information on a report from a
"number of days" field based on the following:

first 30 days
between 30 and 60 days
after 60 days

Please note that the datatype of the field is number.



There are several ways to do that kind of thing. Which one
is appropriate to your situation depends on what you are
trying to accomplish.

--
Marsh
MVP [MS Access]


I want for data on each of the conditions to be returned in a text box. If
for example the number of days taken on a trip for condition 1 (below 30
days) happens to be 5, then 5 must be returned in the text box, if the number
of days between 30 and 60 happens to 10, then 10 should be returned in the
text box.


  #4  
Old July 19th, 2007, 04:48 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default report expression

Alylia wrote:
"Marshall Barton" wrote:
Alylia wrote:
I would like assistance on how to extract information on a report from a
"number of days" field based on the following:

first 30 days
between 30 and 60 days
after 60 days

Please note that the datatype of the field is number.



There are several ways to do that kind of thing. Which one
is appropriate to your situation depends on what you are
trying to accomplish.


I want for data on each of the conditions to be returned in a text box. If
for example the number of days taken on a trip for condition 1 (below 30
days) happens to be 5, then 5 must be returned in the text box, if the number
of days between 30 and 60 happens to 10, then 10 should be returned in the
text box.



Maybe you can use the section's Format event procedure to do
that:

Select Case Me.[number of days]
Case Is 30
Me.textbox = Me.[number of days]
Case 30 To 60
Me.textbox = Me.[number of days] - 30
Case Is 60
Me.textbox = Me.[number of days] - 60
Case Else
MsgBox "'" & Me.[number of days] & "' is invalid"
End Select

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.