Need help badly
I've been beating my head on the key board. The first few times I ran this script, it worked. It would update an appointment in Outlook calendar. How it does not work. I am running this database in MS2007. the db was created in MS 2000.
Using the step into, F8 key, it goes through to line# 15 Set objAppointmentItem = objAppointment.Items.Find("[Subject]=" & Forms! frmShowAllOutlookTasks_fromPopup_1!OLSubject) and then jumps to line# 27 Error msg. The error msg pop up with Error# -2147352567 with "Cannot parse condition. Error at "".
What does parse condition mean and why at ""?
Note: Line#15 shows objAppointmentItem = nothing while the Forms! frmShowAllOutlookTasks_fromPopup_1!OLSubject = "The Loon is here"
I have repaired the db, ran debuging tools and still at a loss.
Can anybody tell me what is not happening?

I've been beating my head on the key board. The first few times I ran this script, it worked. It would update an appointment in Outlook calendar. How it does not work. I am running this database in MS2007. the db was created in MS 2000.
Using the step into, F8 key, it goes through to line# 15 Set objAppointmentItem = objAppointment.Items.Find("[Subject]=" & Forms! frmShowAllOutlookTasks_fromPopup_1!OLSubject) and then jumps to line# 27 Error msg. The error msg pop up with Error# -2147352567 with "Cannot parse condition. Error at "".
What does parse condition mean and why at ""?
Note: Line#15 shows objAppointmentItem = nothing while the Forms! frmShowAllOutlookTasks_fromPopup_1!OLSubject = "The Loon is here"
I have repaired the db, ran debuging tools and still at a loss.
Can anybody tell me what is not happening?
Code:
[FONT=Calibri][SIZE=3]1 Function UpdateOutlookAppointment()[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]2 On Error GoTo ErrorMsg[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]3 Dim objApp As Object[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]4 Dim objAppointmentItem As AppointmentItem[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]5 Dim objNS As NameSpace[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]6 Dim objAppointment As MAPIFolder[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]7 Dim Subject As UserProperty[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]8 Dim RecordID As UserProperty[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]9 Dim taskID As UserProperty[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]10 Dim AppointmentType As UserProperty[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]11 Dim TaskType1 As String[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]12 Set objApp = CreateObject("Outlook.Application")[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]13 Set objNS = objApp.GetNamespace("MAPI")[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]14 Set objAppointment = objNS.GetDefaultFolder(olFolderCalendar)[/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=red][B]15 Set objAppointmentItem = objAppointment.Items.Find("[Subject]=" & Forms!frmShowAllOutlookTasks_fromPopup_1!OLSubject)[/B][/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3]16 Set AppointmentType = objAppointmentItem.UserProperties.Find("objAppointmentItem")[/SIZE][/FONT]
[SIZE=3][FONT=Calibri]17 objAppointmentItem.Body = Forms![/FONT][/SIZE][SIZE=3][FONT=Calibri]frmShowAllOutlookTasks_fromPopup_1!OLNotes 'working[/FONT][/SIZE]
[FONT=Calibri][SIZE=3]18 objAppointmentItem.Save[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]19 Set AppointmentType = Nothing[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]20 Set objAppointmentItem = Nothing[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]21 Done:[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]22 Set objApp = Nothing[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]23 Set objNS = Nothing[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]24 Set objAppointment = Nothing[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]25 Exit Function[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]26 ErrorMsg:[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]27 MsgBox Err.Description, vbCritical, "Error #: " & Err.Number[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]28 Resume Done[/SIZE][/FONT]
[SIZE=3][FONT=Calibri]29 End Function[/FONT][/SIZE]
Last edited: