Export Custom Task Form Data to Access

I have a custom task form in Outlook 97 that I want to be able to export data from into an Access 97 database.  Outlook will not let me export anything except from the default Tasks form.  Any ideas?

OR

What I am really trying to do is have two levels of sorting done easily.  I have assigned different projects by "catagory" but then want to be able to sort by engineer with in the project.  I am using the contact field to put in the engineer's name now and my custom form lets me us a drop down box versus typing in the engineer's name like I would have to do on the default "Tasks" form.  I then wnat to be able to print out a simple table of tasks with notes (more than the three lines that Outlook lets me do now).

Thanks for any help
nolletoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mohnshineConnect With a Mentor Commented:
You can add a record to the database with this code:

Set DBE = Item.Application.CreateObject("DAO.DBEngine.35")
Set DB = DBE.Workspaces(0).OpenDatabase("C:\Folder\Database\Filename")
Set RS = DB.OpenRecordSet("TableName",DbOpenTable)
RS.AddNew
RS("Field") = "NewValue"
RS.Update
RS.MoveLast
RS.Close
DB.Close

------------
To update a record replace RS.AddNew with

RS.Index = "Index" 'Name of index
RS.Seek "=",Index.Value    'Record  index value
RS.Edit

0
 
nolletoAuthor Commented:
I'm sorry but either I don't understand what this code is doing or it looks like it is just moving one field to Access.  Do I put it into Access97 as a macro?  Will it then transfer all of the data from my Outlook "Reading" folder (multiple tasks in my custom "Reading Task" form format) into an Access table?  Do I need to make multiple "field" entries to transfer each field?  Where do I enter which Outlook folder I want to transfer from?

I don't mind overwriting the Access table during each export since I am updating all the data in Outlook anyway if this helps.
0
 
mohnshineCommented:
This is code that you would add to the Outlook form.

It could be triggered by an event of your choosing, probably write or close.  You could also have it associated with a button on the form.

I only showed one field being written to keep it brief.  You can add/update as many fields on a single record as you wish for example:

RS.AddNew
RS("Field") = "NewValue"
RS("Field2") = "NewValue2"
....
RS("Fieldn-1") = "NewValue n-1"
RS("Fieldn") = "NewValue n"
RS.Update

I hope this doesn't confuse you even more.


0
All Courses

From novice to tech pro — start learning today.