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?


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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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("Field") = "NewValue"

To update a record replace RS.AddNew with

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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("Field") = "NewValue"
RS("Field2") = "NewValue2"
RS("Fieldn-1") = "NewValue n-1"
RS("Fieldn") = "NewValue n"

I hope this doesn't confuse you even more.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.