report expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Alylia said:
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.
 
Marshall Barton said:
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.
 
Alylia said:
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
 
Back
Top