J
Jim K
I am using attempting to use office automation to go from
an access form to a report. Following an example I have
been using a basWord module. As I have added fields
eveything went well until I hit memo and numeric fields.
When I try to use one of these fields I get a message that
reads "method or data member not found". Is there a way
to make this work? Code follows:
' Launch Word and load the invoice template
Set objWord = New Word.Application
objWord.Documents.Add _
Application.CurrentProject.Path & "\New-Guts.dot"
objWord.Visible = True
' Add header information using predefined bookmarks
With objWord.ActiveDocument.Bookmarks
.Item("Lname").Range.Text = frmLabPatients.LNAME _
& ", " & frmLabPatients.FNAME
If IsNull(frmLabPatients.BIRTHDATE) Then
.Item("BirthDate").Range.Text = " "
Else
.Item("BirthDate").Range.Text =
frmLabPatients.BIRTHDATE
End If
..
..
..
..Item("cellscounted").Range.Text =
frmLabPatients.CellsCounted
endwith.
Thanks Jim K.
an access form to a report. Following an example I have
been using a basWord module. As I have added fields
eveything went well until I hit memo and numeric fields.
When I try to use one of these fields I get a message that
reads "method or data member not found". Is there a way
to make this work? Code follows:
' Launch Word and load the invoice template
Set objWord = New Word.Application
objWord.Documents.Add _
Application.CurrentProject.Path & "\New-Guts.dot"
objWord.Visible = True
' Add header information using predefined bookmarks
With objWord.ActiveDocument.Bookmarks
.Item("Lname").Range.Text = frmLabPatients.LNAME _
& ", " & frmLabPatients.FNAME
If IsNull(frmLabPatients.BIRTHDATE) Then
.Item("BirthDate").Range.Text = " "
Else
.Item("BirthDate").Range.Text =
frmLabPatients.BIRTHDATE
End If
..
..
..
..Item("cellscounted").Range.Text =
frmLabPatients.CellsCounted
endwith.
Thanks Jim K.