Using Restrict on recurring appointments with Exceptions deliveries wrong results!!!!

L

Lucia

Hi,

I used the following code to get the appointments from a defined time
period.

strRestrict = "[Start] >= '10.01.2006 00:00'"
items = objFolder.Items

items.Sort ("[Start]")
items.IncludeRecurrences = True
resItems = items.Restrict(strRestrict)

For Each appItem In resItems
....
Next

For example I setted one recurring appointment with following single
items:
25.09.2006
02.10.2006

Then I changed the single appointment on 02.10.2006 (Exception). Using
the code above I will not get this recurring appointment.

Why does the method "Restrict" ignor all exceptions of a recurring
appointments?

Has anyone an idea how to solve this problem????

thanks a lot....

Lucia
 
M

Michael Bauer [MVP - Outlook]

Am 28 Aug 2006 08:47:11 -0700 schrieb Lucia:

You search starts on Jan 10th. You do have two items, one on Sep 25th and
one on Oct 2nd. Both are being found, aren´t they?

To what date do you set the exception then?
 
L

Lucia

sorry, I made a mistake here. I checked my program. The start date
which I used is 01.10.2006 00:00. But this is not important....

My problem is I can not find the single appointments with RESTRICT,
which belongs to a recurring one and has been changed after being
created...

I'd appreciated it if you could provide me with a solution...
 
M

Michael Bauer [MVP - Outlook]

Am 29 Aug 2006 00:58:04 -0700 schrieb Lucia:

I know that you use a German system because in English 25.09. isn't possible
:) So, the dates you´re using are important.

Ok, you want to look for appointments starting after Oct. 1st. One of two
appointments starts on Sep 25th, the second you have moved from Oct. 2nd to
- you didn´t say to what date (as far as I understand). If that date is also
before Oct 1st then it´s clear why no one is found.

Please simply check the dates. On a German system you can type German dates.
 
L

Lucia

Hi, Michael,

I didn't move the second appointment and it is still on Oct.2. I just
changed the start time and end time. The programm couldn't find this
appointment.

And I checked my programm carefully. I don't think that this problem
lies in my program.

So my conclusion is:

If you create a recurring appointment and changed all single ones that
are located in the search time period. Then you will not find this
recurring appointment using RESTRICT/FIND.

Viele Grüße

Lucia
 
M

Michael Bauer [MVP - Outlook]

Am 30 Aug 2006 03:11:47 -0700 schrieb Lucia:

Sorry, Lucia, I can´t confirm that. I´m on a German system, too - and your
code looks fine. Here each item is being found, whether it´s an exception or
not.
 
L

Lucia

Hi, Michael,

Anyway, thanks a lot.

It's important for me to know that someone else is using the same
function and can get the complete results without error.

best regards

Lucia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top