Dear Sirs

G

Guest

I have a table with a Yes/No Chexkbox to mark records which I would like to
print on a label. The report I did and it looks OK.
I used the following:

Private Sub cmdPrintLabel_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[print record] = " & Me.[print record]
DoCmd.OpenReport "labelscontactedpersons", acViewNormal, , strWhere
End If
End Sub

The problem is that even if I check the yes/no bos the program ignores the
order - it prints every record in my table. How can I only print the records
which I selected?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top