Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2005

Tip: Looking for answers? Try searching our database.

Dlookup in report Outputname string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Melanie O - 23 Jun 2005 19:47 GMT
I am trying to export a report with a dlookup in the outputname string.

strOutputName = "\\L:\Daily Reports\Brokerage Comb Report " & DLookup("[End
Date]", "Daily Criteria") & ".rtf"

The following error message appears when the report is exported:

Microsoft Office Access can't save the output data to the file you've
selected.

The export works if the dlookup is removed.  Any ideas what might be wrong
with the code?

Thanks,
Melanie
Ofer - 23 Jun 2005 19:52 GMT
The  date field has / chr in it, and that is a problem for a file name, try
this instead

strOutputName = "\\L:\Daily Reports\Brokerage Comb Report " &
format(DLookup("[End Date]", "Daily Criteria"),"ddmmyyyy") & ".rtf"

> I am trying to export a report with a dlookup in the outputname string.
>
[quoted text clipped - 11 lines]
> Thanks,
> Melanie
Melanie O - 23 Jun 2005 20:33 GMT
Thanks.  Worked great!

Melanie

> The  date field has / chr in it, and that is a problem for a file name, try
> this instead
[quoted text clipped - 17 lines]
> > Thanks,
> > Melanie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.