I agree with the coding by Stefan. In that code I also included a check on DAO as follows:
Set Dbe = Item.Application.CreateObject("DAO.DBEngine.36"

If Err.Number <> 0 then
Msgbox Err.Description & " --Some functions may not
work correctly. Contact your folder administrator to
make sure you have DAO 3.6 installed on this
machine."
Exit Sub
End if
Also instead of using the following:
Rs("Field1"

= Item.UserProperties.Find("Field1"

.Value
I am calling a Subroutine Check FieldValues which in turn calls CheckValue. I read somewhere that you needed to check the data. I am not sure how the Field1 statement above would work since I am choosing the fields I want to move.
This is not the entire sub but you'll get the idea.
Sub FieldValues ()
On Error Resume Next
CheckValue "Document ID", "Document ID"
CheckValue "Element", "Element"
CheckValue "Order Number", "TEO Number"
CheckValue "Total Capital", "Total Capital"
End Sub
The first value is the Outlook field the second is the Access field in the table.
Sub CheckValue ()
If Not UserProperties.Find(FormField) is Nothing then
If UserProperties.Find(FormField).Value <> "" then
If IsDate(UserProperties.Find(FormField).Value) then
If UserProperties.Find(FormField).Value <> "1/1/4501" then
Rs(DBfield) = UserProperties.Find(FormField).Value
else
Rs(DbField) = Null
end if
else
Rs(Dbfield)= UserProperties.Find(FormField).Value
end if
end if
end if
end sub
Now everything moves around quite nicely accept when I try to write to Total Capital. In Outlook this is a currency field. I have specified a currency field in Access. The first record I write is perfect. Then I try to do anything else in Outlook that requires a save and Outlook crashes. If I change the access currency field to a text field the problem goes away but then the data can't be added, subtracted, etc. even when moved to Excel. It took me a long time to realize that this was why Outlook crashed. Does my Sub CheckValue cause this problem? If I change the currency fields to number fields, I have the same problem. Date fields work fine. Does anyone have an idea what I could be doing wrong?
Could you also explain to me how the statement
RS("Field1"

=Item.UserProperties.Find("Field1"

.Value works. Do I need to have a line for each field in the form? How would I select the fields I want to write to Access? How do I know what Field1 is? Thanks.
I have done extensive application programming for customizing work flow in our organization and now I'm trying to write some of this to Access. Also now creating the ability to write data into a word form for printing directly from the form. Does anyone need that code?