bonekrusher
Registered User.
- Local time
- Today, 13:21
- Joined
- Nov 19, 2005
- Messages
- 266
Hi All,
I keep getting this message "too few parameters.Expected 1" when I run the following code. My query has a criteria in one of the fields. When I run the code with out the criteria it works, but it exports ALL the data from the table.
what am I missing?
Thanks
I keep getting this message "too few parameters.Expected 1" when I run the following code. My query has a criteria in one of the fields. When I run the code with out the criteria it works, but it exports ALL the data from the table.
Code:
Dim rst As DAO.Recordset
Dim Path As String
Dim objWord As Object
Path = CurrentProject.Path & "\images\AuditCover7.dot"
objWord.Documents.Add (Path)
Set rst = CurrentDb.OpenRecordset("QryFindings")
objWord.ActiveDocument.Bookmarks("findings").Select
While Not rst.EOF
With objWord.Selection
.Move Unit:=4
.InsertParagraphAfter
.Collapse Direction:=1
.TypeText (rst![findings])
'rst![test]
End With
rst.MoveNext
Wend
objWord.Visible = True
Set objWord = Nothing
what am I missing?
Thanks