473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(objAp pointment.Start ) <= dtmEnd And
DateValue(objAp pointment.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.GetFirs t
Do While Not (objAppointment Is Nothing)
If DateValue(objAp pointment.Start ) <= dtmEnd And
DateValue(objAp pointment.End) >= dtmStart Then
objAppointment. delete
End If
Set objAppointment = myItems.FindNex t
Loop
This method always stops after myItems.FindNex t, weither or not anything
is deleted, objAppointment is always set to nothing after Set
objAppointment = myItems.FindNex t

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 1522

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

Similar topics

0
4650
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 Outlook 2000 installed. Upgraded to ASP running on IIS6, Outlook 2000 and SQL 2000 on Windows 2003. Server2 runs windows 2003 with Exchange 2003...
0
357
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 there a way to Create Appointments for everyone i.e. managers, other users through .NET application.
1
1246
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 appreciated! Thanks in advance.
16
6182
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 using which sends If you want to see the above code in its full context you can see it here: ...
1
7944
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 have a form (frmappointments) through which I create an appointment item in my outlook calendar, (and save the appointment to tblappointments in my...
1
2423
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 appointment in my datbase too, so how can a make the change on the database, when someone change the outlook appointment. thx
5
3004
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 appointments in my calendar as the organiser. My question is: Is there anyway to prevent the organiser entry being logged? I have switched off...
0
1319
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 = diary.Items.Find(" = " & Chr(34) & idCheck & Chr(34)) If obj Is Nothing Then 'Now create a new appointment in the user's diary appt =...
2
3040
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 interface with MS Ecxhange or Outlook from a business application and add items to a user's calendar, task list, or at a minimum to set a follow up flag in...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.