Automation of the "OutputTo" Macro ......

G

Guest

On the "OutputTo" Macro I am sending a report to the following location, in
an automation attempt of mine:

="C:\DB_OUT\" & [Forms]![FORM_Link_Websites]![TheDomainName] &
"\public_html\" &
[Queries]![QUERY_E_O_Report_Download_One_Screen]![subdomain] & "\index.html"

As far as I have gathered, the only problem I am having is with the:
[Queries]![QUERY_E_O_Report_Download_One_Screen]![subdomain]

Is the "[Queries]" at the start wrong?
Can Queries not be used like this in macros?


Please help me.... :)
 
S

Steve Schapel

Bert,

No, this is not valid syntax. Access will not know what you mean by
[Queries]! there is no such thing. Even if there was such a thing, you
couldn't use it like that anyway. This makes sense when you think about
it... if you mean the value from a column in a Select Query, this can't
be evaluated unless you specify which record in the query. Even if the
query only returns one record, Access can't be expected to make an
exception in this special case. So, I imagine you will probably need to
use a DLookup function to find the information you are looking for...
which may be as simple as...
DLookup("[subdomain]","QUERY_E_O_Report_Download_One_Screen")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top