Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access2000 - Need calendar help 3

Status
Not open for further replies.

EJVTECH

IS-IT--Management
Jun 7, 2007
8
0
0
US
Hi, I am new to this site but have been programming Access for about 7 years and got a question regarding calendars. I have multiple schedules (vacations, shipment dates, etc.) that I would like to display in a Calendar form to be printed. I have found a couple ways to do this but not satisfied with them.

1. Export the data to spreadsheet, convert to csv, import into Outlook with mapping fields.
Problems: Cumbersome and time consuming, needs to be one-click done.

2. Just started this one, but found a site that shows how to do this with VBA coding but I have to create the form and/or report with 42 subforms.
Problems: Slows down performance, too many subforms to debug/code quickly.

Question: Does anyone have an easier solution to this?

Thanks in advance.
 
You can post directly through code to an Outlook calendar from Access, would this suit?
 
well, there is a calendar control which you can try to format to what you need, but I suspect you won't be able to get it to do everything you want...

if I was to try to duplicate a calendar with a form, I would use a continuous form bound to a temporary table. The temporary table would house a de-normalised set of "day of week" columns and be populated by a query...

certainly not something trivial...

--------------------
Procrastinate Now!
 
Remou:

Posting to Outlook directly to at least get me a quick way to print these calendars would be great but raises another question...

...Would I be able to manipulate that data (drag and drop a job to another complete by data) then import it back to Access?

Do you have a link that will explain the code in detail?

Crowley16:

I will give that a shot, but thinking it thru I can see all orders on given weekdays being displayed not necessarily in a true date format.
 
Here is an example of adding an appointment:

Code:
Private Sub lblCmdAdd_Click()
    Dim olApp As Object 'Outlook.Application
    Dim olItem As Object 'Outlook.AppointmentItem
    Dim RS As DAO.Recordset
    Const olApItem = 1
    
    On Error Resume Next

    Set olApp = GetObject(, "Outlook.Application")
    
    If Err <> 0 Then
        Set olApp = CreateObject("Outlook.Application")
        blnStart = True
    End If

    On Error GoTo 0
    
    'Add appointment ...
    Set olItem = olApp.CreateItem(olApItem)
    With olItem
    'Using data from form ...
        .Subject = Me.txtProgrammeName
        .Location = Trim(Me.cboCourseVenue.Column(1) & "")
        .Start = Me.txtStart
        .End = Me.txtEnd
        .Categories = Me.txtCategory
    'And show it
        .Display
    End With

    Set olApp = Nothing
    Set olItem = Nothing

End Sub

You can link Outlook to Access via code and you can get data from any default folder via automation. A search in these fora will return a number of examples, in fact, I posted one earlier today.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top