Problem with using Query as the source to a Report

B

BobC

I am new at this, so if you can help, please explain with lots of detail.

I'm using: WIN98(SE) and Access 2000.
The database (MAHC.mdb) has several tables, but I am at the moment only
trying to bind information from one of the tables (MASTER) to a report
using a query.
I have create the basic report in 'Design View'.
I designed the query using the 'wizard'.
In the query (AUTO), I am only using two of the fields (COVERAGE and
CURRES).
COVERAGE is a 'text' field and CURRES is a 'number' field.
I want to sum all records in 'MASTER' table who's COVERAGE field is "LIAB".

The structure of the query is as follows:
Field: Total: CURRES COVERAGE
Table: MASTER MASTER
Total: Sum Expression
Sort:
Show 'checked' 'not checked'
Criteria "AUTOLIAB"

When I run the query, I get
TOTAL
500

500 is the correct sum of all the 'CURRES' fields corresponding the
COVERAGE fields that contain "AUTOLIAB'.

In the Report (SUMMARY) I placed a 'text box (Text Box 49)'.
In properties of Text Box 49, I chose the "Data' tap and clicked on
'...' to get the expression builder.
In the Expression Builder, first double-clicked on the query (AUTO)I
then got: 'Total' in the center window and '<value>' in the right window.
I double-clicked on 'value' and got '[AutoLiab-Current Reserves]![Total]
' in the Window.

Now is get: (under the 'data' tab)
Control Source: =[AutoLiab-Current Reserves]![Total]
Input Mask
Running sum: no

When I preview my report, I get "#Name?" in Text Box 49 instead of the
desired answer of "500".

Can anyone tell me what I am doing wrong?

Bob
 
G

Gary Miller

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
B

BobC

Gary,
Did your reply contain something? It came up blank.
Bob

Gary said:
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________

I am new at this, so if you can help, please explain with
lots of detail.

I'm using: WIN98(SE) and Access 2000.
The database (MAHC.mdb) has several tables, but I am at
the moment only

trying to bind information from one of the tables (MASTER)
to a report

using a query.
I have create the basic report in 'Design View'.
I designed the query using the 'wizard'.
In the query (AUTO), I am only using two of the fields
(COVERAGE and

CURRES).
COVERAGE is a 'text' field and CURRES is a 'number' field.
I want to sum all records in 'MASTER' table who's COVERAGE
field is "LIAB".

The structure of the query is as follows:
Field: Total: CURRES COVERAGE
Table: MASTER MASTER
Total: Sum Expression
Sort:
Show 'checked' 'not checked'
Criteria "AUTOLIAB"

When I run the query, I get
TOTAL
500

500 is the correct sum of all the 'CURRES' fields
corresponding the

COVERAGE fields that contain "AUTOLIAB'.

In the Report (SUMMARY) I placed a 'text box (Text Box

49)'.


In properties of Text Box 49, I chose the "Data' tap and
clicked on

'...' to get the expression builder.
In the Expression Builder, first double-clicked on the
query (AUTO)I

then got: 'Total' in the center window and '<value>' in
the right window.

I double-clicked on 'value' and got '[AutoLiab-Current

Reserves]![Total]


' in the Window.

Now is get: (under the 'data' tab)
Control Source: =[AutoLiab-Current

Reserves]![Total]


Input Mask
Running sum: no

When I preview my report, I get "#Name?" in Text Box 49
instead of the

desired answer of "500".

Can anyone tell me what I am doing wrong?

Bob
 
G

Gary Miller

Sorry about the blank post last night. Not sure what
happened there.

Bob,

Access has no clue, nor do I, what "=[AutoLiab-Current
Reserves]![Total]" refers to. This syntax is usually used
for referring to a control on a form or report, certainly
not to a value in a query.

If your report is bound to your table or your query, you
should just be able to put...

=Sum([Curres])

....as the ControlSource. If you would like the report to
list all of the folks with that coverage as well, you can
forgo using the totals query, drop the appropriate fields
that you want to see in the detail section, and your control
in the footer will still show the total at the bottom of the
report.


--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
BobC said:
Gary,
Did your reply contain something? It came up blank.
Bob

Gary said:
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________

I am new at this, so if you can help, please explain with
lots of detail.

I'm using: WIN98(SE) and Access 2000.
The database (MAHC.mdb) has several tables, but I am at
the moment only

trying to bind information from one of the tables (MASTER)
to a report

using a query.
I have create the basic report in 'Design View'.
I designed the query using the 'wizard'.
In the query (AUTO), I am only using two of the fields
(COVERAGE and

CURRES).
COVERAGE is a 'text' field and CURRES is a 'number' field.
I want to sum all records in 'MASTER' table who's COVERAGE
field is "LIAB".

The structure of the query is as follows:
Field: Total: CURRES COVERAGE
Table: MASTER MASTER
Total: Sum Expression
Sort:
Show 'checked' 'not checked'
Criteria "AUTOLIAB"

When I run the query, I get
TOTAL
500

500 is the correct sum of all the 'CURRES' fields
corresponding the

COVERAGE fields that contain "AUTOLIAB'.

In the Report (SUMMARY) I placed a 'text box (Text Box

49)'.


In properties of Text Box 49, I chose the "Data' tap and
clicked on

'...' to get the expression builder.
In the Expression Builder, first double-clicked on the
query (AUTO)I

then got: 'Total' in the center window and '<value>' in
the right window.

I double-clicked on 'value' and got '[AutoLiab-Current

Reserves]![Total]


' in the Window.

Now is get: (under the 'data' tab)
Control Source: =[AutoLiab-Current

Reserves]![Total]


Input Mask
Running sum: no

When I preview my report, I get "#Name?" in Text Box 49
instead of the

desired answer of "500".

Can anyone tell me what I am doing wrong?

Bob
 

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