Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I have never been abl to get my head round loops.

    I have a query called 'qryViewingTextAlert' that contains information within it that I want to e-mail out to each individual record in the query based upon information contained within the record.

    How do I specify the parameters of the e-mail based upon the query and then the field names, e.g To, Subject and Body of message.

    This query is going to run on a scheduled event on a PC once a day.

    Any pointers would be helpful.
    Best Regards,

    Luke

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Do you use Outlook as your email program?

    If so the code in this post should do what you want. You can delete the reference to attachments.

    If you don't use Outlook, you would need to do something similar with docmd.sendobject. I have been looking (so far without success) for an example of looping using that.
    Regards
    John



  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, brilliant, achieved that.

    The next problem I have is that numbers are format liked 99999 999 999 and I need to adjust them in the query to be 99999999999. How can I do this?
    Best Regards,

    Luke

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Do the numbers look like that in the table? What is making them like that...do you have an input mask?
    That looks like a text format rather than a number format to me. Is the field a number or text?
    Regards
    John



Posting Permissions

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