Reports Description Field

  • Thread starter Thread starter FM
  • Start date Start date
F

FM

I am trying to pull the Description of a report, but I
can seem to find the right syntax to include in the
Visual Basic. The description field that I am looking
for can be found when are in the main Access screen and
you right-click on any report name and then go to
Properties. I can pull up the date-created, date-
modified, etc that is also found on that screen, but not
the Description that can be typed in. Thanks in advance.

FM
 
FM said:
I am trying to pull the Description of a report, but I
can seem to find the right syntax to include in the
Visual Basic. The description field that I am looking
for can be found when are in the main Access screen and
you right-click on any report name and then go to
Properties. I can pull up the date-created, date-
modified, etc that is also found on that screen, but not
the Description that can be typed in

CurrentDb.Containers("Reports").Documents(Me.Name).Properties("Description")
 
FM said:
I am trying to pull the Description of a report, but I
can seem to find the right syntax to include in the
Visual Basic. The description field that I am looking
for can be found when are in the main Access screen and
you right-click on any report name and then go to
Properties. I can pull up the date-created, date-
modified, etc that is also found on that screen, but not
the Description that can be typed in.

In response to private email.

You're right, the description property does not exist until
you enter something into it using Access UI or your own
code. The usual way around this is for your code to trap
whatever error that is and use an empty string.


On Error GoTo ErrorHandler
. . .
Me.lstReports.ControlTipText = CurrentDb.Containers( . . .
. . .
ExitHere:
Exit Sub

ErrorHandler:
Select Case Err.Number
Case 3270
Me.lstReports.ControlTipText = "No Descri[tion"
Resume Next
Case Else
MsgBox Err.Number & " - " & Err.Description
Resume ExitHere
End Select
End Sub
 
Back
Top