Why not shown on report?

G

Guest

I want to print out the value of the control based on what you choose from
the form on the report by using Forms! frmForm1!Controlname. However,
everything looks good on the screen but when I tried to print out on the
paper, it has the #Name printed on paper the same place where it looks good
on screen. Does anyone know why?

Thanks a lot!

Ally
 
F

fredg

I want to print out the value of the control based on what you choose from
the form on the report by using Forms! frmForm1!Controlname. However,
everything looks good on the screen but when I tried to print out on the
paper, it has the #Name printed on paper the same place where it looks good
on screen. Does anyone know why?

Thanks a lot!

Ally

I would suspect that somewhere between Report Preview and printing the
report the form has been closed. You'll have to check your code.
 
G

Guest

Access has a bad habit of naming controls on a form or report the same as the
data source. That can confuse things. The trick is to rename the control
somethig slightly different in the form. For example from:
Forms! frmForm1!Controlname
to
Forms! frmForm1!txtControlname

Then use Forms! frmForm1!txtControlname in the report. It's possible that
you may have the use the text or value property of the control also like so:
Forms! frmForm1!txtControlname.value
or
Forms! frmForm1!txtControlname.text

Text is was is showing whereas Value is was is in the underlying data source.

Lastly the form must be open, but can be invisible, for what you are doing
to work.
 
G

Guest

Jerry,

Thanks so much!!! Once I deleted the line of closing the form, which keeps
the form open, it magically works now.

Thanks very much for your help!

Ally
 

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