I have an application in Access 97. When a user inserts a record in a table I have to send a message to another user (in the LAN) to tell him to check the table's new data. How can I do that?
Can anybody help me?
I had to do something very similar for an equipment database that was receiving work order requests by employees. I used a sendobject macro to email a report via outlook in RTF/Word format.
Create a select query that uses the "Last" aggregate option for the Total Row. SQL statement would simlar to:
SELECT Last(tablename.fieldname) AS LastOffieldname,
repeat this for each field
THis would select the last Record based on the fields you selected. In my case my query selects the last work order that has the status of "request" (default value for this field).
Create a report from this query with the format you desire.
Create a macro using the sendobject command. and attach the macro to the "After Insert" Event for the form being used to enter data. I also included "MsgBox" popup in the macro that thanks them for their submission.
Its nothing fancy but it works. Ive run into some issues with the sendobject permission and outlook not being open (it prompts for a user profile), but this seems to have fixed itself somehow (dont ask me).
Of course you have to be using outlook as your email client for this to work.
This will populate the email body with the field names and values for the newly inserted record. And SendObject works for virtually any default email client installed on the system. I tried Outlook, Outlook Express, Netscape Messenger and it worked fine.