so, given what you had, here's how you loop it, check the position field for the val of "capt #1", and 'do something' with the concatenation of the 'first name' and 'last name' fields:
Code:
Private Sub CmdPrntTrukOff_Click()
Dim db As DAO.Database
Dim rs1 As DAO.Recordset
Dim Word As Object 'RENAME THIS VAR (same as app name is not typical)
Dim WrdPrnt As String
Dim txtCpt1 As Variant
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("TblMembers", dbOpenDynaset) 'WAS MISSPELLED
Set Word = CreateObject("Word.Application")
Word.Visible = True
'WrdPrnt = Application.CurrentProject.Path
'WrdPrnt = WrdPrnt + "\TruckOfficers.dotx"
'Word.Documents.Add WrdPrnt
'Word.Visible = True
txtCpt1 = ""
with rs1
.movelast
.movefirst
do until .eof
if .fields(4) = "capt #1" then
txtcapt1 = txtCpt1 & "Help:" & rs1.fields(2) & " " & rs1.fields(3) & vbcrlf
end if
.movenext
loop
end with
With Word.ActiveDocument.Bookmarks
Item("Cpt1201").Range.Text = txtCpt1
End With
rs1.Close
set db=nothing
Set rs1 = Nothing
End Sub
Now, with that of course, the var when it gets sent to the word app will look something like:
Code:
Help: John Doe
Help: Jane Doe
Help: Next Person
So, if you want to throw those values, one at a time into different bm's in the word app, before the ''end if'' section in the loop, write the code to do that. If you want to send the variable over with all of the consolidated info in it, like I've just written, then leave it like it is.
the ''vbcrlf'' stands for 'visual basic character line feed'. Without that, the consolidation of all the info would look like so:
Code:
Help: John DoeHelp: Jane DoeHelp: Next Person
make sense?
hope that helps you on your way.
and when my website is done, I'm sure there will appear a link in my signature. So if you want to check out those resources in the future, keep an eye on that. I'm sure I'll be done with it soon.
Have a good night!