A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , ,

out of memory while running custom form





 
 
Thread Tools Display Modes
  #1  
Old August 8th 06, 08:41 AM posted to microsoft.public.outlook.program_forms
Long Nguyen
external usenet poster
 
Posts: 19
Default out of memory while running custom form

(Outlook 2002 sp3)

I have a vb code in a custom form that run a For ... Next loop to go through
form items in a public folder and checking for a Start Date field in the
item that falls between a nominated period.

Something like -

For I to NumItems
If DateValue(MyItem(I).UserProperties("StartDate") FromDate AND _
DateValue(MyItem(I).UserProperties("StartDate") ToDate Then
...
End If
Next

However when running the code against a folder having some 70 forms I got an
"out of memory or sytsem resources" message.

Anyway to change the code to avoid the problem?

Thanks
Long


Ads
  #2  
Old August 8th 06, 02:56 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,793
Default out of memory while running custom form

Try using a restriction on the Items collection of the folder. Look at the
Object Browser help on Restrict, there's an example of using comparisons on
date fields and you can use user properties if they are in the folder and
not just the items.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Long Nguyen" wrote in message
...
(Outlook 2002 sp3)

I have a vb code in a custom form that run a For ... Next loop to go
through form items in a public folder and checking for a Start Date field
in the item that falls between a nominated period.

Something like -

For I to NumItems
If DateValue(MyItem(I).UserProperties("StartDate") FromDate AND _
DateValue(MyItem(I).UserProperties("StartDate") ToDate Then
...
End If
Next

However when running the code against a folder having some 70 forms I got
an "out of memory or sytsem resources" message.

Anyway to change the code to avoid the problem?

Thanks
Long



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Emailing a contact vCard with custom form loses all custom info Kim Outlook - Using Contacts 7 April 27th 06 01:21 AM
How to access custom field in Custom Form by C# Minh Nguyen Outlook - Using Forms 3 April 24th 06 04:32 PM
Running exe's from a custom button??? Jerry Haynes Outlook and VBA 1 April 24th 06 04:26 PM
Cannot programmatically open custom message in custom form ms Outlook - Using Forms 1 January 20th 06 04:01 PM
Running query from Access Form commmand using VBA code Berny Outlook and VBA 4 January 16th 06 03:12 PM


All times are GMT +1. The time now is 02:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Credit Cards - Equity Release - Debt Help - Buy Shares - Free Credit Report