Results 1 to 3 of 3

Thread: Email Control

  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I have a form for entering foundry data. One of the controls is set to Limit to list, and if the item is not on the list, the question is asked if it is to be added. I have also set up code, so an email is sent to notify our department when a new item is added. How do I get the email to specify the contents of the control that has been added? The control name is MasterMeltNo.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    In the On Not In List event procedure, the value being added is passed as the NewData argument. You can use NewData in your e-mail, for example

    DoCmd.SendObject To:="me@company.com", Subject:="New item", _
    MessageText:="A new item " & NewData & " has been added"

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Hans. That's brilliant and going to stop a lot of problem. Our foundry dept are supposed to notify us when they cast a new melt, but quite often don't. This will eliminate this problem. Thanks again.

Posting Permissions

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