473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problems deleteing appointments in Outlook from Access

In my database I need to keep the offices calendar up to date with the
current information that my database is tracking. To do this I am
entering events as appointments. Entering them into outlook is not a
problem. The problem comes from when I want to mass delete
appointments. When I try to mass delete all the appointments from a
specific date to a specific date not all of the appointments are deleted

When I try this:

For Each objAppointment In myItems
' Testing if objAppointment is in range, if it is, it will
delete it
If DateValue(objAppointment.Start) <= dtmEnd And
DateValue(objAppointment.End) >= dtmStart Then
objAppointment.delete
End If
Next

When trying this method only half of the appointments are deleted

When I try this method:

Set objAppointment = myItems.GetFirst
Do While Not (objAppointment Is Nothing)
If DateValue(objAppointment.Start) <= dtmEnd And
DateValue(objAppointment.End) >= dtmStart Then
objAppointment.delete
End If
Set objAppointment = myItems.FindNext
Loop
This method always stops after myItems.FindNext, weither or not anything
is deleted, objAppointment is always set to nothing after Set
objAppointment = myItems.FindNext

I would like to come up with a better and cleaner method then adding a
while loop and a Boolean to the first one and setting the Boolean to
true when I delete something and running the loop again if I delete
something. While this would get the job done, I am looking for
something cleaner.

Thanks
Jun 9 '07 #1
0 1505

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nitec Dev | last post by:
Our setup: server1 ASP database running on IIS5, Outlook 2000 and SQL 2000 on Windows 2000. Server2 runs Windows 2000 with Exchange 2000 using CDO 1.2 MAPI Sessions. Clients use IE5/6 and had...
0
by: Pramod | last post by:
Experts I am also trying to create appointments for Outlook users on a specific Day and time. I was told you can't create appointments for others (but only for the user who is logged on). Is...
1
by: Mark | last post by:
Hello, Can anyone help me out on how to pull a list of appointments using from Outlook using VB.NET where the appointments show date, time and description? Any help would be greatly...
16
by: Kosmos | last post by:
Good afternoon everyone, just wondering if anyone knew if it's possible to send meetings or appointments through email when you run VBA or SQL code in Access 2003? The following is the code I've been...
1
by: keri | last post by:
Hi everyone, After numerous failed attempts at this I am now trying again to solve this problem. I really would appreciate ANY help as I have been stumped with this for weeks and weeks! I...
1
by: tbb | last post by:
hi I can create outlook apoointments using the outlook object model. But now to my problem, if the user edit/change the appointment in outlook I have inconsistent data because I store the...
5
by: mattkorguk | last post by:
Hi, Following the introduction of an appointment booking system in Access I've now given myself another issue. As I'm sending lots of appointments out I'm also then getting lots of the same...
0
by: Ben Grimwade | last post by:
Hi, im developing an Application that integrates with Outlook by creating an appointment in there calender. The code in question is below Dim appt As Outlook.AppointmentItem obj =...
2
by: =?Utf-8?B?RU1jQ2FydGh5?= | last post by:
My organization currently has interfaces in place to generate MS Outlook emails from our business applications. I am trying to determine if it is possible and how difficult it might be to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.