Re: Restrict Method DNW
- From: Michael Bauer <mb@xxxxxxxx>
- Date: Thu, 23 Mar 2006 18:35:38 +0100
Am Thu, 23 Mar 2006 06:18:30 -0800 schrieb emanson:
What values do DateTo and DateFrom contain? Did you try to count the result
as suggested instead of reading the Count property?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
I do not receive an error message. The following is the format I use fordate:
all
strFind = "[FlagRequest] < " & Chr(34) & Format(DateTo, "ddddd h:nn
AMPM") & Chr(34) & " AND [FlagRequest] >= " & Chr(34) & Format(DateFrom,
"ddddd h:nn AMPM") & Chr(34)
I have tried many other conditions to see if I can get the Restrict method
to work at all but with no luck. It thinks for a second and then returns
items in the collection no matter what condition I set.set
Thanks!
Ed
"Michael Bauer" wrote:
Am Wed, 22 Mar 2006 10:01:28 -0800 schrieb emanson:
Do you get an error message? What format has the field?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Adding myItms.IncludeRecurrences = False had no effect. I am unable toget
the restrict method to work with any field/condition is it possible thatthis
may be an issue with the version/environment?should
Thanks Michael for you help,
Ed
"Michael Bauer" wrote:
Am Wed, 22 Mar 2006 07:36:30 -0800 schrieb emanson:
Sorry, my fault. I didn´t read your first post carefully. The filter
be ok.
That all items are returned, i.e. Count = 2147483647, happens if you
DateTo),loopIncludeRecurrences=True.
In that case if you need to know the number of items then you need to
through the result and count them:
Dim obj as Object
Dim i as Long
For Each obj in myItems
i=i+1
Next
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Michael -
I changed strFind to the following:
strFind = "[FlagRequest] < " & Chr(34) & Format(DateAdd("d", 1,
"ddddd[FlagRequest]"yyyy.mm.dd hh:nn") & Chr(34) & " AND [FlagRequest] >= " & Chr(34) &
Format(DateFrom, "yyyy.mm.dd hh:nn") & Chr(34)
still no luck. When I tried using [ReceivedTime] instead of
I
trapped the following formatting error: type mismatch or theAMPM")
"2006.02.03 00:00" is not valid. Any ideas?
Thanks!
Ed
"Michael Bauer" wrote:
Am Tue, 21 Mar 2006 10:56:32 -0800 schrieb emanson:
If FlagRequest is a DateTime field then the values are stored in this
format: yyyy.mm.dd hh:nn
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Any idea why the following does not work (Returns all items incollection):
strFind = "[FlagRequest] < " & Chr(34) & Format(DateTo, "ddddd h:nn
&
Chr(34) & " AND [FlagRequest] >= " & Chr(34) & Format(DateFrom,
.theh:nn
AMPM") & Chr(34)
Set myItms = objFolder.Items
Set myItms = myItms.Restrict(strFind)
Please let me know if you need more information. I have also tried
toabove using [ReceivedTime] rather than my user defined [FlagRequest]
no
avail. Any help would be greatly appreciated.
Thanks!
Ed
- Follow-Ups:
- Re: Restrict Method DNW
- From: emanson
- Re: Restrict Method DNW
- References:
- Re: Restrict Method DNW
- From: Michael Bauer
- Re: Restrict Method DNW
- From: Michael Bauer
- Re: Restrict Method DNW
- From: emanson
- Re: Restrict Method DNW
- From: Michael Bauer
- Re: Restrict Method DNW
- From: emanson
- Re: Restrict Method DNW
- Prev by Date: Re: email using redemption
- Next by Date: RE: Version confusion
- Previous by thread: Re: Restrict Method DNW
- Next by thread: Re: Restrict Method DNW
- Index(es):
Relevant Pages
|