By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

Printing just the current record of a subform

P: n/a
Hello!

What's the best way to make a button print *just* the selected
(displayed) record of a subform, when that subform is currently part
of a larger form?

Thanks!
Nov 26 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Dave" <da*******@gmail.comwrote in message
news:8b**********************************@b40g2000 prf.googlegroups.com...
Hello!

What's the best way to make a button print *just* the selected
(displayed) record of a subform, when that subform is currently part
of a larger form?

Thanks!
Not sure if there is a best way to print a form. You ought to be printing a
report.

However, here's one way. Filter the subform so it has just the record you
want in its recordset, print the form, then switch off the filter:

With Me.SubformControlName.Form
.Filter = "FieldName = <whatever>"
.FilterOn = True
End With

'Do the print out

Me.SubformControlName.Form.FilterOn = False

Nov 26 '07 #2

P: n/a
Here is a way to do it manually. Maybe someone can enlighten us on how
to do it programatically.

When you are sitting on any form in form view (execution). go to the
menubar and select
file
print preview.

This brings up a print preview of what is on the screen with a
(questionable) option of printing it as is or just printing the data
part (without column headings or labels)

Ron
Nov 27 '07 #3

P: n/a
I found where I had done it on a button:
DoCmd.RunCommand acCmdPrintPreview


Ron
Nov 29 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.