Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Posts
    36

    Unanswered: rename a query to email

    Hi,

    Im using sendobject to send a query out to customers as an excel sheet. The query selects the correct info from a table of data on all customers based on a customer ID field on a form.

    How can I name the file Im sending out to include the customer ID? The sendobject requires me to name the object (which is the query), I want the name of the file I send to be specific to the customer. Any pointers would be great.

    Thanks

  2. #2
    Join Date
    Mar 2003
    Location
    Romania
    Posts
    32

    Thumbs down

    Not clever but you can use for each customer a copy of your query with a name that points to a specific customer (use the CopyObject method of the DoCmd object).
    You may delete the "copy" after you use SendObject.
    Florin Profeanu
    floreanuprofin@yahoo.com

  3. #3
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    122
    I would leave the name of the query as it is and include the customer information in the subject of the email. After all, each customer gets its own attachment and doesn't care about other customers, right?

    HTH

  4. #4
    Join Date
    Mar 2003
    Posts
    36
    Theres 150 customers. The subject already has a reference to what the contents of the attachment are. Unfortunately several customers recieve a few emails each. the subject will differentiate them but theyre complaining they end up with all these excel files called "query.xls".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •