Restrict Appointments by EntryID not working

Status
Not open for further replies.
M

MB34

(Using Delphi)

Trying to restrict AppointmentItems by EntryID like below:

Folder := Namespace.GetDefaultFolder( olFolderCalendar );

Items := Folder.Items;

AppointmentItems := Items.Restrict('[EntryID] = "' +

qryEvents.fieldByName('OLEntrytID').AsString + '"');

But getting this error:

-2147352567 "Condition is not valid"

I *KNOW* that the VALUE is valid.

Am I doing something incorrectly?
 
On Jun 26, 11:12 am, MB34 <mrbasebal...@hotmail.com> wrote:
> (Using Delphi)
> Trying to restrict AppointmentItems by EntryID like below:

>           Folder    := Namespace.GetDefaultFolder( olFolderCalendar );
>           Items     := Folder.Items;
>           AppointmentItems := Items.Restrict('[EntryID] = "' +
> qryEvents.fieldByName('OLEntrytID').AsString + '"');

> But getting this error:
> -2147352567 "Condition is not valid"

> I *KNOW* that the VALUE is valid.

> Am I doing something incorrectly?


According to Sue Mosher:

If you looked up Restrict in Help, you'd quickly learn that EntryID is

one of the fields you can't use. Instead, you should be using the

Namespace.GetItemFromID method.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R How to restrict GWSMO sync to Outlook Send/Receive cycles Using Outlook 0
B oContacts.Items.Restrict Misses Some Contacts Outlook VBA and Custom Forms 3
K Disabling import/export button to restrict PST creation Using Outlook 3
A .restrict results changing after moving to Exchange online Outlook VBA and Custom Forms 0
L Restrict accepted appts to specific calendar Using Outlook 2
oliv- .RESTRICT returning birthdays regardless of the filtering date Outlook VBA and Custom Forms 8
M Using .Restrict with a UserProperty in an Exchange folder Outlook VBA and Custom Forms 4
JorgeDario restrict access to a certain folder with vba Outlook VBA and Custom Forms 3
JorgeDario How to restrict the creation of new folders? Outlook VBA and Custom Forms 2
C Outlook 2010, Need to restrict domain users from installing any sort of a addin in outlook Using Outlook 2
S Restrict method question on email. What am I doing wrong? Outlook VBA and Custom Forms 2
M Restrict throwing 'Condition is not valid' error Outlook VBA and Custom Forms 5
A Outlook 365 New Appointments All saved to a 365 default calendar on Mac Using Outlook 0
M New Calendar Appointments: Conditionally turn off reminder and show time as free Using Outlook 11
Kika Melo Outlook Calendar deleted appointments not in Deleted Items folder Using Outlook 3
e_a_g_l_e_p_i Outlook 2021 all appointments not showing in calendar Using Outlook 2
S Changing colors of today's appointments, but not recurring ones Using Outlook 33
M Printing Appointments Using Outlook 1
M Calendar daily Appointments and printing Using Outlook 0
C Add Form to Appointments Received, Automatically Outlook VBA and Custom Forms 6
L Option to Show Cancelled Appointments Using Outlook 0
O Export Outlook calendar appointments by filters and date range Outlook VBA and Custom Forms 1
R Outlook 2007 only loads some appointments Using Outlook 0
N Gathering Calendar Appointments from Calendars that synced as Contacts Exchange Server Administration 1
F Year-and-a-day recurring appointments Using Outlook 1
J what file contains contacts, tasks and appointments stored locally? Using Outlook 1
D hiding appointments that are completed or cancelled, how to ? Using Outlook 5
M warning for too many appointments on a same day in Outlook Using Outlook 1
V importing appointments to non-default calendar? Using Outlook 1
OutlookIntegrator Appointments Using Outlook 0
R Make past appointments remain in calendar Using Outlook 1
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
A Outlook.com changing appointments Using Outlook 8
T populate calendar with appointments and send reminders Using Outlook 1
Diane Poremsky Copy New Appointments to Another Calendar using VBA Using Outlook 0
Diane Poremsky Create Appointments Using Spreadsheet Data Using Outlook 0
Diane Poremsky How to Import Appointments into a Group Calendar Using Outlook 0
I Outlook 2013 Appointments not in HTML Using Outlook.com accounts in Outlook 2
makinmyway Appointments Created in iCloud Calendars Cover Contacts Field...Why? Using Outlook 3
M Expected behaviour of recurring appointments? Using Outlook 2
C Find all deleted recurrence appointments Outlook VBA and Custom Forms 4
M Copy new appointments created in multiple shared calendars to another exchange calendar Outlook VBA and Custom Forms 1
R Outlook calendar appointments Free/Busy time is changing from "Busy" to "Free" Using Outlook 2
G Outlook does not show new appointments in To-Do-Bar Using Outlook 0
A Looping appointments in calendar Outlook VBA and Custom Forms 0
B Outlook Calendar/setting appointments Using Outlook 1
L Appointments disappearing Using Outlook 0
N To do bar - show more than 30 days of appointments Using Outlook 0
A Show ALL of today's appointments in To-Do Bar Using Outlook 1
F Outlook 2007 Calendar Appointments not in Outlook Today view Using Outlook 11

Similar threads

Back
Top