Asking For Parameter???

  • Thread starter Charles Phillips
  • Start date
C

Charles Phillips

Hello,
I am using MS-Access 2003.
I have a field name "Replace?", that I turned into a combo box, with a
"Value List" of :
Yes
No
Complete
In Progress
On Hold

I created the report to display the total number of systems completed, using
the following:

=Sum([Replace?(Complete)])

Each time I display the report, it is asking "Replace?(Complete)" Parameter.
If I type in ANY number, it gives me the correct amount. If I just press
"Enter", it displays a "0".
How can I get around this??? I do not want ANYONE to enter ANY parameters...


Thank you,

Charles L. Phillips
 
R

Rick Brandt

Charles said:
Hello,
I am using MS-Access 2003.
I have a field name "Replace?", that I turned into a combo box, with a
"Value List" of :
Yes
No
Complete
In Progress
On Hold

I created the report to display the total number of systems
completed, using the following:

=Sum([Replace?(Complete)])

Each time I display the report, it is asking "Replace?(Complete)"
Parameter. If I type in ANY number, it gives me the correct amount.
If I just press "Enter", it displays a "0".
How can I get around this??? I do not want ANYONE to enter ANY
parameters...

1) Bad idea to have a ? in a field name.

2) What's with the (Complete)? If your field is named Replace? then you need
Sum([Replace?])

If you only want the sum where [Replace?] is equal to "Complete" then you need
to put that in the criteria of the query.
 
F

fredg

Hello,
I am using MS-Access 2003.
I have a field name "Replace?", that I turned into a combo box, with a
"Value List" of :
Yes
No
Complete
In Progress
On Hold

I created the report to display the total number of systems completed, using
the following:

=Sum([Replace?(Complete)])

Each time I display the report, it is asking "Replace?(Complete)" Parameter.
If I type in ANY number, it gives me the correct amount. If I just press
"Enter", it displays a "0".
How can I get around this??? I do not want ANYONE to enter ANY parameters...

Thank you,

Charles L. Phillips

aRE YOU trying to count how many records are complete in the report?

=Abs(Sum([Replace?]= "Complete"))

Note: It's a bad practice to use symbols (i.e. ?) in a field name,
and 'Replace' by itself is the name of an Access function and
therefore should not be used as a field name.
I would suggest you try 'txtReplace' or 'Replaced' as the field name
instead, , but not Replace nor Replace?.
 
A

Alan.M

Hi Charles,

Did you rename "Replace?" - if you have, and it isn't the same in your
query, that would explain why it's asking you for the value.
Could I suggest copying the name from the table and pasting it into your
query and cbo. This might overcome any accidental typo's.
Hello,
I am using MS-Access 2003.
I have a field name "Replace?", that I turned into a combo box, with a
"Value List" of :
Yes
No
Complete
In Progress
On Hold

I created the report to display the total number of systems completed, using
the following:

=Sum([Replace?(Complete)])

Each time I display the report, it is asking "Replace?(Complete)" Parameter.
 
C

Charles Phillips

Hello,
All of your assumptions are correct.
I took some time over the weekend & thought about what I was trying to do &
redesigned the db to reflect what
it is I need to do. I replaced "Replace?(Complete), to "Replace?" & added
the table "Replace Status". Instead
of complicating "Replace?" with additional strings, I left the field as Yes
or No. I made a combo box for
"Replace Status" (Complete;In Progress;On Hold), now I'll try a NEW query
with this NEW configuration...

Tell me what you believe, feel or think of the change...

Thank you,


Rick Brandt said:
Charles said:
Hello,
I am using MS-Access 2003.
I have a field name "Replace?", that I turned into a combo box, with a
"Value List" of :
Yes
No
Complete
In Progress
On Hold

I created the report to display the total number of systems
completed, using the following:

=Sum([Replace?(Complete)])

Each time I display the report, it is asking "Replace?(Complete)"
Parameter. If I type in ANY number, it gives me the correct amount.
If I just press "Enter", it displays a "0".
How can I get around this??? I do not want ANYONE to enter ANY
parameters...

1) Bad idea to have a ? in a field name.

2) What's with the (Complete)? If your field is named Replace? then you
need Sum([Replace?])

If you only want the sum where [Replace?] is equal to "Complete" then you
need to put that in the criteria of the query.
 

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