• Calendar Scheduling

    Author
    Topic
    #351660

    Does anyone know where I can get and add on for Access to allow me to create an appointment book? I am developing for a doctor and would like to have the ability to use this.

    Thanks!

    Viewing 0 reply threads
    Author
    Replies
    • #509652

      Is there a particular reason why Outlook is unsuitable? Specifically the Calendar section of Outlook.

      I have developed an App which the user (per button press although it could be automatic) makes a Calendar entry at the desired date/time. Outlook can be set to pop up a reminder at a predetermined time before that entry. If that is any use I could let you have some code.

      • #509671

        I’d appreciate that, Andy. The only reason Outlook may not be a good choice is I am going to use the runtime of Access. But, if it will be too much, I’ll include Outlook in my quote.
        Thanks

        • #509693

          This is my first use of Outlook – It may need some improvements but it seems to function OK by my customer.

          Private Sub DesiredDeliveryDate_Outlook_Click()

          If IsNull(Me!DesiredDeliveryDate) Then
          MsgBox “Requires date for DesiredDelivery”
          Exit Sub
          End If

          On Error Resume Next

          DoCmd.RunCommand acCmdSaveRecord
          If Err.Number = 2501 Then ‘Saving stopped
          Err.Clear
          Exit Sub
          ElseIf Err.Number > 0 Then
          MsgBox Err.Description
          Err.Clear
          Exit Sub
          End If

          Dim mobjOLNamespace As OUTLOOK.NameSpace

          ‘ Get a reference to the MAPI namespace– this will log the user into Outlook
          If mobjOLNamespace Is Nothing Then

          Dim objOutlook As New OUTLOOK.Application
          Dim objNamespace As OUTLOOK.NameSpace

          ‘ Get a reference to the MAPI workspace
          Set objNamespace = objOutlook.GetNamespace(“MAPI”)
          Call objNamespace.Logon(“”, “”, False, True)

          Set mobjOLNamespace = objNamespace
          End If

          ‘ Make sure we have a valid reference
          If mobjOLNamespace Is Nothing Then
          MsgBox “Error connecting to Outlook.”, vbExclamation
          Exit Sub
          Else
          ‘ Get a reference to the “Calendar” folder
          Dim objOLCalendar As OUTLOOK.MAPIFolder
          Set objOLCalendar = mobjOLNamespace.GetDefaultFolder(olFolderCalendar)

          ‘ Create a new calendar item, set it’s properties, and save it
          With objOLCalendar.Items.Add(olAppointmentItem)
          Dim s As String
          s = “Musterungskontrolle ‘Feedback bis’ Entry”
          s = s & ” ” & “ID=” & Me!MusterungskontrolleID
          s = s & ” ” & “Kunde=” & Me!KundeKurzname

          If Not IsNull(Me!Titer1) Then s = s & Me!Titer1 & ” ”

          s = s & ” ” & “DesiredDeliveryDate=” & Format$(Me!DesiredDeliveryDate, “dd.mm.yyyy”)

          .Subject = s

          Dim dte As Date
          dte = CVDate(Me!DesiredDeliveryDate & ” 09:00:00″)

          .Start = dte
          .End = dte
          .ReminderSet = True
          .Save
          End With

          mobjOLNamespace.Logoff

          End If

          ‘ Wipe out object variable (this will terminate Outlook if we started it)
          Set mobjOLNamespace = Nothing

          MsgBox “Outlook entry completed”

          End Sub

    Viewing 0 reply threads
    Reply To: Calendar Scheduling

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: