I am using the following code to move the records from a continuous form to a text field. This code returns all of the records in the form. I want the code to return only the records that meet a certain criteria, ie. (The print check box in the record is checked)
What changes to the code do I make to accomplish this?
Thanks
accel45
Public Sub PackEEG()
Dim rst As DAO.Recordset, Pack As String, DL As String
Set rst = Me.RecordsetClone
rst.MoveFirst
DL = vbNewLine
'& vbNewLine
Do
Pack = Pack & Format(rst!Date, "ddd") & ", " & Format(rst!Date, "mmm dd"", ""yyyy") & vbCrLf
Pack = Pack & Format(rst!Event, ">") & " "
Pack = Pack & Format(rst!Time, "h:mmAM/PM") & " "
Pack = Pack & rst!Opponent & " @" & " "
Pack = Pack & rst!Location & vbCrLf
Pack = Pack & rst!Note & vbCrLf
rst.MoveNext
If Not rst.EOF Then Pack = Pack & DL
Loop Until rst.EOF
Me!YourMemoControlName = Pack
DoCmd.RunCommand acCmdSaveRecord
Set rst = Nothing
End Sub
What changes to the code do I make to accomplish this?
Thanks
accel45
Public Sub PackEEG()
Dim rst As DAO.Recordset, Pack As String, DL As String
Set rst = Me.RecordsetClone
rst.MoveFirst
DL = vbNewLine
'& vbNewLine
Do
Pack = Pack & Format(rst!Date, "ddd") & ", " & Format(rst!Date, "mmm dd"", ""yyyy") & vbCrLf
Pack = Pack & Format(rst!Event, ">") & " "
Pack = Pack & Format(rst!Time, "h:mmAM/PM") & " "
Pack = Pack & rst!Opponent & " @" & " "
Pack = Pack & rst!Location & vbCrLf
Pack = Pack & rst!Note & vbCrLf
rst.MoveNext
If Not rst.EOF Then Pack = Pack & DL
Loop Until rst.EOF
Me!YourMemoControlName = Pack
DoCmd.RunCommand acCmdSaveRecord
Set rst = Nothing
End Sub