Why not shown on report?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
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
 
Back
Top