Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access, Outlook or just Microsoft Office- 1

Status
Not open for further replies.

kevinluebb

Programmer
Jan 4, 2002
30
0
0
US
Not sure what category this would fall under.....

I've created a database in Access that uses multiple input forms that track projects our team is working. Users can enter new requests.

What I'm wondering.......is there a way to notify me via Outlook that there is a new request (new record in the request table)? I only want to be notified when a new request is input not when modifications are made to existing records.

Each new record, when entered, comes into the table with a status of Submitted. The status is unchanged until it is Assigned.
 
when a user updated a record, you can add a macro that sends the mail.

You can use the command: SendObject, using a query , criteria Form ID of record that has been created.

I don't have that much time to respond, so feel free to ask more info

good luck.
 
I think I know what you're saying there. I created a macro using the SendObject. I left the object type, object name, output format, to, cc,bcc blank(I will get promted for the to address). in the message text i put something like....new request entered.

When i try to run the macro, it errors and says it cannot open the mail session.

We're using Outlook as our email software. I'm pretty sure the programming interface is running.
 
I know the feeling.. to prevent breaking your head and brainstorming.

First use a simple Sendobject with something you will be sure that works.

for example you create a table, and then create a macro that sends the contents of the table in excel format to you.

afterwards you can finetune.

That is the fun of access, keep trying, and trying.
Good luck !!
 
If you can write VBA code rather than use a macro then you Visual Basic. I send out agendas and minutes programmatically depending on an option button on a form. The following contains the basic approach but you can make it as fancy as you want or as basica as you want.

Steve King

Dim oMailApp As New Outlook.Application
Dim oMail As New MailItem

strAddressee = ""
strCC = ""
strBody = ""
strSubject = ""
strSalutation = ""
bAgenda = False
bMinutes = False

On Error GoTo HandleErr

If Me.fraMsgType = 0 Then
MsgBox "You must select a message type and source prior to sending the message."
GoTo Exit_Proc
End If

Select Case Me.fraMsgType
Case AGENDA

bAgenda = True

strSubject = "Dominium " & mstrBoardType & " Agenda (" & mstrBoard_Date & " " _
& mstrBoard_Time & ")" & vbCrLf

'Getting the list of addressees for the message
' ***** AGENDA (ADDRESSEES) *****
strAddressees = GetAddressees(mintBOARDID)

' ***** BOARD PROFILE*****
'Getting the board information and comments
strBody = strBody & GetLocation(mintBOARDID, AGENDA)

' ***** AGENDA (PARTICIPANTS)
'Getting the participants for the Board meeting
' Lead in text for the participants
strBody = strBody & GetParticipants(mintBOARDID, mstrBoardType, AGENDA)

' ***** AGENDA (AGENDA ITEM STATUS) *****
'Getting the agenda items and comments
strBody = strBody & GetAgendaItems(mintBOARDID, AGENDA)

' ***** AGENDA (IR STATUS) *****
'Getting the scheduled IRs and status
strBody = strBody & GetIRs(mintBOARDID, AGENDA)

' ***** AGENDA (ACTION ITEM) *****
'Getting the action items and status
strBody = strBody & GetActionItems(mintBOARDID, AGENDA)

' ***** AGENDA (SALUTATION) *****
'Getting the salutation
strBody = strBody & GetSalutation()

Case MINUTES

bMinutes = True
strSubject = "Dominium " & mstrBoardType & " Minutes (" & mstrBoard_Date & " " _
& mstrBoard_Time & ")" & vbCrLf

'Getting the list of addressees for the message
' ***** MINUTES (ADDRESSEES) *****
strAddressees = GetAddressees(mintBOARDID)

'Getting the list of CCs for the message
'These people are assigned action items and did not attend the board meeting
' ***** MINUTES (CC) *****
strCC = GetTaskedEmail(mintBOARDID, strAddressees)

' ***** BOARD PROFILE*****
'Getting the board information and comments
strBody = strBody & GetLocation(mintBOARDID, MINUTES)

' ***** MINUTES (PARTICIPANTS)
'Getting the participants of the Board meeting
strBody = strBody & GetParticipants(mintBOARDID, mstrBoardType, MINUTES)

' ***** MINUTES (AGENDA ITEM STATUS) *****
'Getting the agenda items and comments
strBody = strBody & GetAgendaItems(mintBOARDID, MINUTES)

' ***** MINUTES (IR STATUS) *****
'Getting the status of IRs for this Board
strBody = strBody & GetIRs(mintBOARDID, MINUTES)

' ***** MINUTES (ACTION ITEM STATUS) *****
'Getting the action item status.
strBody = strBody & GetActionItems(mintBOARDID, MINUTES)

' ***** MINUTES (SALUTATION) *****
'Getting the salutation
strBody = strBody & GetSalutation()

Case IMMEDIATE

bImmediate = True
'Getting the addressee for the CM Manager
' ***** IMMMEDIATE (ADDRESSEE) *****
strAddressees = GetCMAddress() & ";" & mstrIdentifier

'Defining the subject
' ***** IMMMEDIATE (SUBJECT) *****
strSubject = "Immediate Priority Notification Message (" & mstrIRNbr & ")"

'Building the message
' ***** IMMMEDIATE (BODY) *****
strBody = BuildIRMessage(mstrIRNbr)

Case Else

End Select

Set oMailApp = CreateObject("Outlook.Application")
Set oMail = oMailApp.CreateItem(olMailItem)
With oMail
.To = strAddressees
If Len(strCC) > 0 Then
.CC = strCC
End If
.Subject = strSubject
.Body = strBody
.Importance = olImportanceHigh
.Display
'.SenderName = CurrentUser
.Sensitivity = olPrivate
End With
Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top