Access Report

  • Thread starter zixingw via AccessMonster.com
  • Start date
Z

zixingw via AccessMonster.com

Is there any way to program to let the report has different tiles when it
opens.

A report's record source links to a query. I used VBA to change this query by
change the SQL string of qry.sql. I want to the report tile changes based on
the change of the parameters that defines SQL string.

I try to add a text box on the report and set its data source to Forms!
frmCreateSQL!txtTitle.value
and keep frmCreateSQL opens.

When report opens, the text "Red Cell Report" of Forms!frmCreateSQL!txtTitle.
value DOES NOT display on report's text box.

Anyone can help me to resolve this issue

Thanks

Zixing
 
S

StrayBullet

Ive found that if the textbox being referenced still has focus when the
report is opened, the value sometimes is ignored. Is there a button being
clicked which would take focus off txtTitle?
 
M

Marshall Barton

zixingw said:
Is there any way to program to let the report has different tiles when it
opens.

A report's record source links to a query. I used VBA to change this query by
change the SQL string of qry.sql. I want to the report tile changes based on
the change of the parameters that defines SQL string.

I try to add a text box on the report and set its data source to Forms!
frmCreateSQL!txtTitle.value
and keep frmCreateSQL opens.

When report opens, the text "Red Cell Report" of Forms!frmCreateSQL!txtTitle.
value DOES NOT display on report's text box.


When you use anything except a record source field in the
control source property, you must use an = sign.
 
Z

zixingw via AccessMonster.com

Thanks StrayBullet,

The textbox on the form has lost focus, because a button on form is clicked
to open the report.

Details:

The title "Red Cell Report" is in the textbox of the form(form name is
frmCreateSQL). The name of this textbox is txtTitle

A textbox named txtRptTile was added to report, and assigned data resource on
it using:
= Forms!frmCreateSQL!txtTitle.value

Click a button "Report" on frmCreateSQL, the report opens, but the text "Red
Cell Report" does not
display in the textbox "txtRptTitle" of the report.

Thanks again,

Zixing
Ive found that if the textbox being referenced still has focus when the
report is opened, the value sometimes is ignored. Is there a button being
clicked which would take focus off txtTitle?
Is there any way to program to let the report has different tiles when it
opens.
[quoted text clipped - 15 lines]
 
S

StrayBullet via AccessMonster.com

Wow - that really should work... So long as the form is not closing as the
report is opened, there should be nothing stopping the textbox on the report
from referencing the textbox on the form. The only other thing I can think of
would be to doublecheck the spelling of the names of the form and textbox.
 

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