Jan 28 2008, 11:35 AM
Hi, I'm not sure if this is where this question belongs, but it doesn't fit very well anywhere else. I have tblExports which is a link to an ODBC table that refreshes every 60 minutes. Is there a way to receive an e-mail from my Access db when certain fields in the linked table are updated? I started simple, so if you have any questions, please feel free to ask. I appreciate the help.
Jan 28 2008, 12:53 PM
First question: How are the fields updated?
Jan 28 2008, 01:10 PM
Easy answer - my IT department does it. :-)
I'm kidding, sort of. I know that's not the answer you're looking for. I don't know what is being done behind the scenes to update the information. Once an hour there is something that a programmer wrote that updates all fields in the table. I have that table linked to my Access db. I belive that the linked table is from an Oracle db.
Jan 29 2008, 01:59 AM
The easiest way would be to have the same program that updates the fields to also send the email out. Assuming that that is not possible, are you concerned about knowing if a new record is added or if any field was updated?
For new records, you can query the RecordCount of the tables every so often and send the email when a difference is detected. For field updates, that would be a little harder. Please explain more.
Jan 30 2008, 09:59 AM
I would need the field update functionality. It is a bill of lading field that is null until we ship an order. Once that happens, the bill of lading field is populated with a 13 digit number. What I'd like to do is have an e-mail generate based on when that field is populated.
Feb 3 2008, 01:51 AM
Since I don't know how you're updating the field, I will give you an example of one way it could be done. I hope you will be able to use it.
In the AfterUpdate event of the control for the bill of lading, you can put something like this:
DoCmd.SendObject, acSendNoObject, , ,"ToAddy", "CcAddy", , "Item #" & Me.ItemID & " has been shipped.", "EmailBody", True
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here