PC Review


Reply
Thread Tools Rate Thread

Dlookup in report Outputname string

 
 
=?Utf-8?B?TWVsYW5pZSBP?=
Guest
Posts: n/a
 
      23rd Jun 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      23rd Jun 2005
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"


"Melanie O" wrote:

> 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

 
Reply With Quote
 
=?Utf-8?B?TWVsYW5pZSBP?=
Guest
Posts: n/a
 
      23rd Jun 2005
Thanks. Worked great!

Melanie

"Ofer" wrote:

> 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"
>
>
> "Melanie O" wrote:
>
> > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dlookup and string for criteria DRBE Microsoft Access Form Coding 5 6th Oct 2008 12:15 PM
string in dlookup : how many quotes ? W Microsoft Access Form Coding 8 27th Jan 2008 04:34 PM
Dlookup returning a string instead of Integer =?Utf-8?B?Q2hhY2U=?= Microsoft Access Form Coding 2 23rd Jan 2006 08:14 AM
String and Dlookup DubboPete Microsoft Access Form Coding 3 9th Nov 2005 08:22 AM
two variable dlookup string Brenton Anderson Microsoft Access VBA Modules 2 3rd Nov 2003 12:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:44 PM.