reminders from access 2003 to outlook 2007/2003 (1 Viewer)

gera24

New member
Local time
Yesterday, 18:09
Joined
Jan 27, 2010
Messages
6
I need help please, i made a database for my business. Its been working well for 3 years now. we have all the clients info there. I built it myself and i had zero knowledge on this area. So i am basically in diapers. I have learned how to use access, learning from what EXPERTS (you) write online.
I found a thread online talking about reminders set up on access and transfered to outlook.

http://www.access-programmers.co.uk/forums/showthread.php?t=31517

I did all of what is in the red text. After i click the button of SEND TO OUTLOOK another message pops up and says:

This appointment already added to microsoft utlook.

I go to my outlok but there is nothing in my calendar.
WHAT COULD IT BE? PLEASE GIVE ME A HAND GUYS/GIRLS!!!!

Here's an example to create a form to add an appointment to Outlook. Of course the names can be changed and other fields can be added.

Create the following table (name it tblAppointments)

Field Name: Appt
Data Type: Text
Field Size: 50
Required: Yes
Field Name: ApptDate
Data Type: Date/Time
Format: Short Date
Required: Yes
Field Name: ApptTime
Data Type: Date/Time
Format: Medium Time
Required: Yes
Field Name: ApptLength
Data Type: Number
Field Size: Long Integer
Default Value: 15
Required: Yes
Field Name: ApptNotes
Data Type: Memo
Field Name: ApptLocation
Data Type: Text
Field Size: 50
Field Name: ApptReminder
Data Type: Yes/No
Field Name: ReminderMinutes
Data Type: Number
Field Size: Long Integer
Default Value: 15
Field Name: AddedToOutlook
Data Type: Yes/No


PrimaryKey: ApptDate;ApptTime
NOTE: In this example, the primary key in the appointment table is the appointment date and time. You can remove or alter the primary key if you want to be able to add multiple appointments for the same date and time.
Create a reference to the Microsoft Outlook Object Library. To do so, follow these steps:
Create a new module.
On the Tools menu, click References.
Click Microsoft Outlook Object Library in the Available References box.
Click OK in the Reference dialog box.
Close the module without saving it.

Use the AutoForm: Columnar Form Wizard to create a new form based on the tblAppointments table. Save the form as frmAppointments.
Open the form in Design view and change the following properties:
Form Name: frmAppointments
-------------------------
Caption: Appointment Form

Form Header:
Height: .5"
Check Box: AddedToOutlook
Enabled: No

Add a command button to the Form Header section, and set the following properties:
Command Button:
Name: AddAppt
Caption: Send to Outlook
OnClick: [Event Procedure]

Set the OnClick property of the command button to the following event procedure:

Private Sub AddAppt_Click()
' Save record first to be sure required fields are filled.
DoCmd.RunCommand acCmdSaveRecord
' Exit the procedure if appointment has been added to Outlook.
If Me!AddedToOutlook = True Then
MsgBox "This appointment already added to Microsoft Outlook"
Exit Sub
' Add a new appointment.
Else
Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
.Start = Me!ApptDate & " " & Me!ApptTime
.Duration = Me!ApptLength
.Subject = Me!Appt
If Not IsNull(Me!ApptNotes) Then .Body = Me!ApptNotes
If Not IsNull(Me!ApptLocation) Then .Location = _
Me!ApptLocation
If Me!ApptReminder Then
.ReminderMinutesBeforeStart = Me!ReminderMinutes
.ReminderSet = True
End If
.Save
End With
End If
' Release the Outlook object variable.
Set outobj = Nothing
' Set the AddedToOutlook flag, save the record, display a message.
Me!AddedToOutlook = True
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Appointment Added!"
Exit Sub
AddAppt_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub

Save the form and open it in Form view. Add an appointment record, and then click the Send To Outlook button. Be sure you only enter minutes, not hours and minutes, in the ApptLength field.

Start Microsoft Outlook and click Calendar on the Go menu to view the appointments you added.

The error message needs worked....cheers.


--------------------------------------------------------------------

 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:09
Joined
Aug 30, 2003
Messages
36,127
If you're getting that message, then this condition is being met:

If Me!AddedToOutlook = True Then

Check the value of that field in the table.
 

gera24

New member
Local time
Yesterday, 18:09
Joined
Jan 27, 2010
Messages
6
I am at the table, but where should i look for that? sorry to be a problem, i am a rookie on this!? i promise i will buy a book to learn more!

I mean, i know where that field is, and is a yes/no checkbox, but what i have to check?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:09
Joined
Aug 30, 2003
Messages
36,127
AddedToOutlook is the name of a field (column). The message you're getting implies that the value for the record (row) in question is True, and that code will only add to Outlook if it's False. It's there to protect you from adding the same appointment over and over.
 

gera24

New member
Local time
Yesterday, 18:09
Joined
Jan 27, 2010
Messages
6
Oh, i see, i already checked and the data i added in the form is the sameone than in the table. I guess that the problem is in some other area! i dont know what else to do! uuffff this is frustating so minor problem and i cant fix it hahahaha ( well to me is a huge problem).
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:09
Joined
Aug 30, 2003
Messages
36,127
Can you post the db?
 

Users who are viewing this thread

Top Bottom