Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case statement in report 1

Status
Not open for further replies.
Oct 23, 2002
110
US
I have a table where one record has six statuses, each status has a date associated with it. I need to retain all the dates associated with every status, but on a report I want to show only the date associated with the current status. I can successfully do this with a Select Case statement in a form, but how can I do this in a report?
 
In the Report Place an Unboud Text Field (TextBox1)
In Report VBA Window Write a Code in Detail_Format Event as follows

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Select Case <<...>>
      Case 1
          me.TextBox1 = <<desired Status Date>>
      Case 2
          me.TextBox1 = <<desired Status Date>>
      Case 3
          me.TextBox1 = <<desired Status Date>>
      ...
End Sub

Hope this helps...

Regards,
 
You may create a query as recordsource of the report.
Or show us some sample data and required achivement

________________________________________________________
Zameer Abdulla
Help to find Missing people
Even a thief takes ten years to learn his trade.
 
HandsOnAccess - THANK YOU!!! This worked perfectly. I was at a loss as to where to put the VBA code on a report. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top