browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need Microsoft Access / VBA help?

Get answers from our community of Microsoft Access / VBA experts on BYTES! It's free.

DoCmd.PrintOut .... Doesn't

Smartin
Guest
 
Posts: n/a
#1: Nov 13 '05
Question about DoCmd.PrintOut in A97.

I have a form on which all the controls are unbound. There is a large
textbox that the user can type stuff in and a couple labels. I am trying
to code a Print button to simply print out the form.

Problem is, DoCmd.PrintOut only produces a blank page. (Actually once in
testing, it printed the form module's code, but not the form.)

In another app I am working on, PrintOut successfully prints the form
and data. The difference, or at least the obvious difference to me, is
that in the other app the form's controls are data-bound.

Does this seem like a limitation of the PrintOut method? I have not seen
any indication of this in the help file, but wondered if anyone else has
had the same experience.

Thanks for any suggestions.

I am posting another question separately about a potential work-around
using a report to take care of the printing.

This is an awesome group, BTW!
--
Smartin



Wayne Gillespie
Guest
 
Posts: n/a
#2: Nov 13 '05

re: DoCmd.PrintOut .... Doesn't


On Wed, 26 Oct 2005 18:19:35 -0400, Smartin <smartin108@yahoo.com> wrote:
[color=blue]
>Question about DoCmd.PrintOut in A97.
>
>I have a form on which all the controls are unbound. There is a large
>textbox that the user can type stuff in and a couple labels. I am trying
>to code a Print button to simply print out the form.
>
>Problem is, DoCmd.PrintOut only produces a blank page. (Actually once in
>testing, it printed the form module's code, but not the form.)
>
>In another app I am working on, PrintOut successfully prints the form
>and data. The difference, or at least the obvious difference to me, is
>that in the other app the form's controls are data-bound.
>
>Does this seem like a limitation of the PrintOut method? I have not seen
>any indication of this in the help file, but wondered if anyone else has
>had the same experience.
>
>Thanks for any suggestions.
>
>I am posting another question separately about a potential work-around
>using a report to take care of the printing.
>
>This is an awesome group, BTW![/color]

Forms are for viewing, Reports are for printing.
Create a report which displays the same data as your form. Use your print button to print the report for the selected
record.

DoCmd.OpenReport "rptMyReport",,,"(MyIDField)=" & Me.MyIDField


Smartin
Guest
 
Posts: n/a
#3: Nov 13 '05

re: DoCmd.PrintOut .... Doesn't


Wayne Gillespie wrote:[color=blue]
> On Wed, 26 Oct 2005 18:19:35 -0400, Smartin <smartin108@yahoo.com> wrote:
>
>[color=green]
>>Question about DoCmd.PrintOut in A97.
>>
>>I have a form on which all the controls are unbound. There is a large
>>textbox that the user can type stuff in and a couple labels. I am trying
>>to code a Print button to simply print out the form.
>>
>>Problem is, DoCmd.PrintOut only produces a blank page. (Actually once in
>>testing, it printed the form module's code, but not the form.)
>>
>>In another app I am working on, PrintOut successfully prints the form
>>and data. The difference, or at least the obvious difference to me, is
>>that in the other app the form's controls are data-bound.
>>
>>Does this seem like a limitation of the PrintOut method? I have not seen
>>any indication of this in the help file, but wondered if anyone else has
>>had the same experience.
>>
>>Thanks for any suggestions.
>>
>>I am posting another question separately about a potential work-around
>>using a report to take care of the printing.
>>
>>This is an awesome group, BTW![/color]
>
>
> Forms are for viewing, Reports are for printing.
> Create a report which displays the same data as your form. Use your print button to print the report for the selected
> record.
>
> DoCmd.OpenReport "rptMyReport",,,"(MyIDField)=" & Me.MyIDField
>
>[/color]

Thanks for that, Wayne.

In my question concerning forms (<ne2dnQ2nXK_5mP3eRVn-hQ@giganews.com>)
I am able to do that much, but I was hoping to do some formatting on the
fly.

I was puzzled about my ability to print one form but not the other.
--
Smartin
Closed Thread