Object name

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

Guest

Hi,

I am making an export function that uses the dbpath and the name of the open
object. It prompts the user only for the kind of "Outputformat".

DoCmd.OutputTo acReport, "", , strExportfile, True

It prompts the user for the sort of output, *.xls or *.rtf. Can you fetch
this and use it in you "outputfile"??
The name of the outputfile should be the name of the report that is being
exported.

How can I get the name of the open report?
 
Dim strActiveReportName as String
On Error resume next
strActiveReportName = Screen.ActiveReport.Name
If len(strActiveReportName) > 0 Then
' Export it
Else
Msg Box "No Report is currently the active Object", 16
End if
 
Back
Top