How to create a new appointment

Discussion in 'Questions (Windows Mobile)' started by willisgt, May 14, 2008.

  1. willisgt

    willisgt Active Member Licensed User

    I'm trying to create a new appointment, but my code:

    Msgbox"appointments: " & tableAppointments.RowCount )

    For i = 0 To tableAppointments.RowCount - 1


          appointment.AllDayEvent             = tableAppointments.Cell( 
    "allday", i )
          appointment.Body                   = tableAppointments.Cell( 
    "body", i )
          appointment.Categories                = tableAppointments.Cell( 
    "cat", i )
          appointment.Duration                = tableAppointments.Cell( 
    "duration", i )
          appointment.EndTime                = tableAppointments.Cell( 
    "endtime", i )
          appointment.Location                = tableAppointments.Cell( 
    "location", i )
          appointment.ReminderDialog             = tableAppointments.Cell( 
    "reminderDialog", i )
          appointment.ReminderLed             = tableAppointments.Cell( 
    "reminderLED", i )
          appointment.ReminderMinutesBeforeStart   = tableAppointments.Cell( 
    "reminderMINS", i )
          appointment.ReminderRepeat             = tableAppointments.Cell( 
    "reminderRepeat", i )
          appointment.ReminderSet             = tableAppointments.Cell( 
    "reminderSet", i )
          appointment.ReminderSound             = tableAppointments.Cell( 
    "reminderSound", i )
          appointment.ReminderSoundFile          = tableAppointments.Cell( 
    "reminderSoundFile", i )
          appointment.ReminderVibrate          = tableAppointments.Cell( 
    "reminderVibrate", i )
          appointment.Start                   = tableAppointments.Cell( 
    "start", i )
          appointment.Subject                = tableAppointments.Cell( 
    "subject", i )
          AppointmentsCollection.AddItem( appointment.Value )

    doesn't work - meaning, the appointment never shows up the the Calendar (that's the Windows Mobile built-in calendar I'm referring to).

    The table has 36 rows, and I've verified that it's reading each row correctly.

    No crash, no error - the program just doesn't work... anyone see what I'm doing wrong?


  2. Erel

    Erel Administrator Staff Member Licensed User

    The following code works properly:
    Sub App_Start
        App.Start = Now
        App.Duration = 
        App.Subject = 
    End Sub
    Maybe some of your values are wrong.
  3. willisgt

    willisgt Active Member Licensed User

    I suppose some of the values could be wrong, but I would be suprised if that were the case.

    This particular program is intended to fetch all of the appointments, contacts, and tasks from the device. It loads them into tables (one for each group) and dumps the table to a CSV file (one each for apoointments, contacts, and tasks).

    Once the data files are transferred to another device, it loads the CSV files into tables and (is supposed to) recreate the appointments, contacts, and tasks on the target device. It's only that last step that I'm having problems with.

    So if the data came from a device, into a table, and into a CSV file; then from CSV to table to device, I wonder how any of the values could be wrong?

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice