List Info

Thread: The value of 'Reports!rptInvoice!fldDepartment.Value' does not show on report




The value of 'Reports!rptInvoice!fldDepartment.Value' does not show on report
country flaguser name
United States
2008-03-28 16:57:00

I am auto-generating a report with the following code

DoCmd.OpenReport "rptInvoice";, acViewDesign

SQLStr = "SELECT * FROM qryPatron_Shared " & _
"INNER JOIN tmp_qryJob " & _
"ON qryPatron_Shared.fldPatronID = tmp_qryJob.fldPatronID " & _
"WHERE qryPatron_Shared.fldPatronID='" & rst!fldPatronID & "'"
Reports!rptinvoice.RecordSource = SQLStr
DoCmd.OpenReport "rptInvoice";, acViewPreview
Reports!rptinvoice!fldDepartment.Value = _
DLookup("[fldDeptFullName]", "qryDepartmentListing";, "[fldDeptCode]='" & _
Reports![rptinvoice]![fldDept] & "'")
DoCmd.Close acReport, "rptInvoice";, acSaveNo

The "Reports!rptInvoice!fldDepartment.Value = " line gets the right
value (the name of the department) stored in the reports field
"fldDepartment." The returned value does not, however, show up on the
report. I have tried refresh, repaint, and requery to no effect. The
field remains blank.

Access 2007 vba
The data is being looked up in a foreign table not part of the
recordsource.
This code is applied to control the form from a command button on a
menu form.

Suggestions appreciated.

__._,_.___
.

__,_._,___
Re: The value of 'Reports!rptInvoice!fldDepartment.Value' does not show on repo
country flaguser name
United States
2008-03-28 17:18:21

After a couple of days trying, I may have just figured this one out.

--- In helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com, "wharmon97" <wmhLists...> wrote:
&gt;
> I am auto-generating a report with the following code
>;
>
> DoCmd.OpenReport "rptInvoice";, acViewDesign
>
> SQLStr = "SELECT * FROM qryPatron_Shared " & _
> "INNER JOIN tmp_qryJob " & _
> "ON qryPatron_Shared.fldPatronID = tmp_qryJob.fldPatronID " & _
> "WHERE qryPatron_Shared.fldPatronID='" & rst!fldPatronID & "'&quot;
> Reports!rptinvoice.RecordSource = SQLStr
&gt; DoCmd.OpenReport "rptInvoice";, acViewPreview
> Reports!rptinvoice!fldDepartment.Value = _
> DLookup(&quot;[fldDeptFullName]", "qryDepartmentListing";,
"[fldDeptCode]='" & _
> Reports![rptinvoice]![fldDept] & "'&quot;)
> DoCmd.Close acReport, "rptInvoice";, acSaveNo
>
>
> The "Reports!rptInvoice!fldDepartment.Value = " line gets the right
&gt; value (the name of the department) stored in the reports field
&gt; "fldDepartment." The returned value does not, however, show up on the
> report. I have tried refresh, repaint, and requery to no effect. The
> field remains blank.
&gt;
> Access 2007 vba
> The data is being looked up in a foreign table not part of the
> recordsource.
> This code is applied to control the form from a command button on a
> menu form.
&gt;
>
> Suggestions appreciated.
>

__._,_.___
.

__,_._,___
RE: Re: The value of 'Reports!rptInvoice!fldDepartment.Value' does not show on repo
country flaguser name
United States
2008-03-29 08:41:55

What have you figured out on this?

Don&#8217;t leave us hanging230;.  ;)

 

/tr

 

 


From: helpwithvbyahoogroups.com [mailto:helpwithvbyahoogroups.com] On Behalf Of wharmon97
Sent: Friday, March 28, 2008 6:18 PM
To: helpwithvbyahoogroups.com
Subject: [helpwithvb] Re: The value of 'Reports!rptInvoice!fldDepartment.Value' does not show on repo

 

After a couple of days trying, I may have just figured this one out.

--- In helpwithvb%40yahoogroups.com">helpwithvbyahoogroups.com, &quot;wharmon97" <wmhLists...> wrote:
&gt;
> I am auto-generating a report with the following code
>;
>
> DoCmd.OpenReport "rptInvoice";, acViewDesign
>
> SQLStr = "SELECT * FROM qryPatron_Shared " & _
> "INNER JOIN tmp_qryJob " & _
> "ON qryPatron_Shared.fldPatronID = tmp_qryJob.fldPatronID " & _
> "WHERE qryPatron_Shared.fldPatronID='" & rst!fldPatronID & "'&quot;
> Reports!rptinvoice.RecordSource = SQLStr
&gt; DoCmd.OpenReport "rptInvoice";, acViewPreview
> Reports!rptinvoice!fldDepartment.Value = _
> DLookup(&quot;[fldDeptFullName]", "qryDepartmentListing";,
"[fldDeptCode]='" & _
> Reports![rptinvoice]![fldDept] & "'&quot;)
> DoCmd.Close acReport, "rptInvoice";, acSaveNo
>
>
> The "Reports!rptInvoice!fldDepartment.Value = " line gets the right
&gt; value (the name of the department) stored in the reports field
&gt; "fldDepartment." The returned value does not, however, show up on the
> report. I have tried refresh, repaint, and requery to no effect. The
> field remains blank.
&gt;
> Access 2007 vba
> The data is being looked up in a foreign table not part of the
> recordsource.
> This code is applied to control the form from a command button on a
> menu form.
&gt;
>
> Suggestions appreciated.
>

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )