theConjurian
IS-IT--Management
I have a module that will manipulate "appointments" in an Outlook calendar. The calendar entry has a reference number that is keyed to the Access database.
Unfortunately, I cannot use a custom field to hold this reference number as there are other restrictions which prevent this.
I have this reference number in the Message field along with specific details of the appointment.
The message field begins:
Reference: \n Booking No: 1063.1 \n Status: Confirmed ...
To create the record set of objCalendarItems I need an strWhere statement that reads as in the following PSEUDO code:
ii = len (ReferenceNo & "." & LineNo)
strWhere = "Left([Message], 29 + ii) = """ & "Reference: " & "\n" & " Booking No: " & ReferenceNo & "." & No & """"
objAllCalendarItems.Sort "[Message]", True
Set objCalendarItems = objAllCalendarItems.Restrict(strWhere)
This form of code does not work.
Can someone suggest another approach or the correct coding??
Unfortunately, I cannot use a custom field to hold this reference number as there are other restrictions which prevent this.
I have this reference number in the Message field along with specific details of the appointment.
The message field begins:
Reference: \n Booking No: 1063.1 \n Status: Confirmed ...
To create the record set of objCalendarItems I need an strWhere statement that reads as in the following PSEUDO code:
ii = len (ReferenceNo & "." & LineNo)
strWhere = "Left([Message], 29 + ii) = """ & "Reference: " & "\n" & " Booking No: " & ReferenceNo & "." & No & """"
objAllCalendarItems.Sort "[Message]", True
Set objCalendarItems = objAllCalendarItems.Restrict(strWhere)
This form of code does not work.
Can someone suggest another approach or the correct coding??