Question

Need to remove warning "Enter Parameter Value"

Asked by: IUfoltzie

Here is the SQL, I get the "Enter Parameter Value" popups for the Sum of Sum of month requests and the sum actuals line.  Data entered into the box is not used. Points go to whomever can help me figure out why and remove them, extra points can be giving if this can be slimmed down a bit (which I assume it can, this was quick and dirty and I havent had time to clean it up yet)

SELECT DISTINCTROW tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], qry_CMPM_enhancing_FTE.[Cost Group ID], qry_CMPM_enhancing_FTE.PIW, Sum(qry_CMPM_enhancing_FTE.[Sum Of January]) AS [Sum Of Sum Of January], Sum(qry_CMPM_enhancing_FTE.[Sum Of Febuary]) AS [Sum Of Sum Of Febuary], Sum(qry_CMPM_enhancing_FTE.[Sum Of March]) AS [Sum Of Sum Of March], Sum(qry_CMPM_enhancing_FTE.[Sum Of April]) AS [Sum Of Sum Of April], Sum(qry_CMPM_enhancing_FTE.[Sum Of May]) AS [Sum Of Sum Of May], Sum(qry_CMPM_enhancing_FTE.[Sum Of June]) AS [Sum Of Sum Of June], Sum(qry_CMPM_enhancing_FTE.[Sum Of July]) AS [Sum Of Sum Of July], Sum(qry_CMPM_enhancing_FTE.[Sum Of August]) AS [Sum Of Sum Of August], Sum(qry_CMPM_enhancing_FTE.[Sum Of September]) AS [Sum Of Sum Of September], Sum(qry_CMPM_enhancing_FTE.[Sum Of October]) AS [Sum Of Sum Of October], Sum(qry_CMPM_enhancing_FTE.[Sum Of November]) AS [Sum Of Sum Of November], Sum(qry_CMPM_enhancing_FTE.[Sum Of December]) AS [Sum Of Sum Of December], Sum(qry_CMPM_enhancing_FTE.[Sum Of YTD Regular]) AS [Sum Of Sum Of YTD Regular], [Sum Of Sum Of January]+[Sum Of Sum Of Febuary]+[Sum Of Sum Of March]+[Sum Of Sum Of April]+[Sum Of Sum Of May] AS Sum_Actuals, (([Sum_Actuals]/152)/5) AS AVG_YTD_Actuals
FROM (qry_CMPM_enhancing_FTE LEFT JOIN tbl_cost_group ON qry_CMPM_enhancing_FTE.[Cost Group ID] = tbl_cost_group.[Cost Group ID]) RIGHT JOIN tbl_cost_piw_title_type ON qry_CMPM_enhancing_FTE.[Cost Group ID] = tbl_cost_piw_title_type.[Cost Group ID]
GROUP BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], qry_CMPM_enhancing_FTE.[Cost Group ID], qry_CMPM_enhancing_FTE.PIW, [Sum Of Sum Of January]+[Sum Of Sum Of Febuary]+[Sum Of Sum Of March]+[Sum Of Sum Of April]+[Sum Of Sum Of May], (([Sum_Actuals]/152)/5)
ORDER BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application;


Thanks EE!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-06-24 at 08:59:56ID21036982
Tags

parameter

Topic

Microsoft Access Database

Participating Experts
4
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. DISTINCTROW Problem
    Here is my query: SELECT Distinctrow SUBCAT From $tablename Where PRODUCTTYPE = 'widgets' ORDER BY SUBCAT I am trying to select the entire row but this is only returning the SUBCAT column. The query is in a .php file and pulling from a MySQL database
  2. Anoying popup warnings
    Someone was kind enough to develop this code for me that closed the data entry form called ‘Scores’ and opened the ‘Members’ Form to allow the addition of a new member. But when I enter an entry that isn’t in the list I get two popup’s asking if I want to add “xyz” to the lis...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: rockiroadsPosted on 2004-06-24 at 09:13:47ID: 11390554

Enter Parameter Value is what u get in parameter queries i.e. you are prompting for a value
if not expected it means you got a field in your query which does not exist
double check all fields used in your query, thats in select, where clause etc

 

by: rockiroadsPosted on 2004-06-24 at 09:14:31ID: 11390563

first guess would be one of those in square brackets

 

by: avatar889Posted on 2004-06-24 at 09:16:47ID: 11390583

Hi IUfoltzie,
    It will tell you to do that if the query has a field that does not exist.  As far as cleaning up your code, good luck with that.  Maybe try breaking it down and storing it in more different queries.  It is possible that Access is just getting confused.

--------------------------
Frank Lindiakos
Application Developer
WeberSystems Inc.
frank@webersystems.com
fotios@csh.rit.edu

 

by: IUfoltziePosted on 2004-06-24 at 09:17:45ID: 11390588

ok some of my fields are blank (this is a query against a payroll database for hours)... and certainly months that have not occured yet will have nothing in them.

That might explain why, does anyone know how I could fix the problem?

 

by: capricorn1Posted on 2004-06-24 at 09:22:14ID: 11390635

use the NZ function

Nz(FieldName,0)  for numeric type field

Nz(FeildName,"") for text type field

 

by: IUfoltziePosted on 2004-06-24 at 09:35:30ID: 11390744

Do I put that into the query line?

 

by: capricorn1Posted on 2004-06-24 at 09:43:48ID: 11390835

i suggest that you use the Nz on the query

    qry_CMPM_enhancing_FTE  for all the fields that you are totalling.

 

by: NestorioPosted on 2004-06-24 at 09:58:55ID: 11390973

IUFoltzie,

You can't group by a field that is itself the result of a grouping.

In that, you can't group by:

[Sum Of Sum Of January]+[Sum Of Sum Of Febuary]+[Sum Of Sum Of March]+[Sum Of Sum Of April]+[Sum Of Sum Of May]

because these Sum of Sum of month are the result of group Sum of month.

Regards

 

by: NestorioPosted on 2004-06-24 at 10:07:03ID: 11391051

So, following with my post before try this (I removed the grouped fields in the group clause):

SELECT DISTINCTROW tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], qry_CMPM_enhancing_FTE.[Cost Group ID], qry_CMPM_enhancing_FTE.PIW, Sum(qry_CMPM_enhancing_FTE.[Sum Of January]) AS [Sum Of Sum Of January], Sum(qry_CMPM_enhancing_FTE.[Sum Of Febuary]) AS [Sum Of Sum Of Febuary], Sum(qry_CMPM_enhancing_FTE.[Sum Of March]) AS [Sum Of Sum Of March], Sum(qry_CMPM_enhancing_FTE.[Sum Of April]) AS [Sum Of Sum Of April], Sum(qry_CMPM_enhancing_FTE.[Sum Of May]) AS [Sum Of Sum Of May], Sum(qry_CMPM_enhancing_FTE.[Sum Of June]) AS [Sum Of Sum Of June], Sum(qry_CMPM_enhancing_FTE.[Sum Of July]) AS [Sum Of Sum Of July], Sum(qry_CMPM_enhancing_FTE.[Sum Of August]) AS [Sum Of Sum Of August], Sum(qry_CMPM_enhancing_FTE.[Sum Of September]) AS [Sum Of Sum Of September], Sum(qry_CMPM_enhancing_FTE.[Sum Of October]) AS [Sum Of Sum Of October], Sum(qry_CMPM_enhancing_FTE.[Sum Of November]) AS [Sum Of Sum Of November], Sum(qry_CMPM_enhancing_FTE.[Sum Of December]) AS [Sum Of Sum Of December], Sum(qry_CMPM_enhancing_FTE.[Sum Of YTD Regular]) AS [Sum Of Sum Of YTD Regular], [Sum Of Sum Of January]+[Sum Of Sum Of Febuary]+[Sum Of Sum Of March]+[Sum Of Sum Of April]+[Sum Of Sum Of May] AS Sum_Actuals, (([Sum_Actuals]/152)/5) AS AVG_YTD_Actuals
FROM (qry_CMPM_enhancing_FTE LEFT JOIN tbl_cost_group ON qry_CMPM_enhancing_FTE.[Cost Group ID] = tbl_cost_group.[Cost Group ID]) RIGHT JOIN tbl_cost_piw_title_type ON qry_CMPM_enhancing_FTE.[Cost Group ID] = tbl_cost_piw_title_type.[Cost Group ID]
GROUP BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], qry_CMPM_enhancing_FTE.[Cost Group ID], qry_CMPM_enhancing_FTE.PIW
ORDER BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application;

 

by: NestorioPosted on 2004-06-24 at 10:59:31ID: 11391593

I've corrected my last post:

open data db shared
use db.dbc alias mydbc shared again

select ObjectName from mydbc ;
   where upper(ObjectType)="VIEW" ;
   and upper(ObjectName) not in ;
   (select upper(fldTable) from mytable) ;
   and upper(ObjectName) not in ;
   (select upper(rtrim(fldTable))+"_ALL" from mytable) ;
   into cursor mycursor
 
select mycursor
copy to myxls xl5

close all

 

by: NestorioPosted on 2004-06-24 at 11:00:25ID: 11391599

Sorry my last post was not for you.

 

by: IUfoltziePosted on 2004-06-24 at 11:00:52ID: 11391607

I cleaned up the query to this (and I might clean it up more)

SELECT DISTINCTROW tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], tbl_cost_piw_title_type.PIW, Sum(qry_CMPM_groupRC.Sum_January) AS SumOfSum_January, Sum(qry_CMPM_groupRC.Sum_Febuary) AS SumOfSum_Febuary, Sum(qry_CMPM_groupRC.Sum_March) AS SumOfSum_March, Sum(qry_CMPM_groupRC.Sum_April) AS SumOfSum_April, Sum(qry_CMPM_groupRC.Sum_May) AS SumOfSum_May, Sum(qry_CMPM_groupRC.Sum_June) AS SumOfSum_June, Sum(qry_CMPM_groupRC.Sum_July) AS SumOfSum_July, Sum(qry_CMPM_groupRC.Sum_August) AS SumOfSum_August, Sum(qry_CMPM_groupRC.Sum_September) AS SumOfSum_September, Sum(qry_CMPM_groupRC.Sum_October) AS SumOfSum_October, Sum(qry_CMPM_groupRC.Sum_November) AS SumOfSum_November, Sum(qry_CMPM_groupRC.Sum_December) AS SumOfSum_December, Sum(qry_CMPM_groupRC.[Sum_YTD Regular]) AS [SumOfSum_YTD Regular]
FROM tbl_cost_piw_title_type LEFT JOIN qry_CMPM_groupRC ON tbl_cost_piw_title_type.[Cost Group ID] = qry_CMPM_groupRC.[Cost Group ID]
GROUP BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application, tbl_cost_piw_title_type.[Cost Group ID], tbl_cost_piw_title_type.PIW
ORDER BY tbl_cost_piw_title_type.[Work Type], tbl_cost_piw_title_type.Project_Application;

This doesnt have the sum from Jan-May included yet... I am curious the thread thinks a another query on top is best...

Also could someone explain to me the NZ function as it relates to access?

 

by: NestorioPosted on 2004-06-24 at 11:15:50ID: 11391781

IUfoltzie,

Have you tried the query I've posted before? (not the wrong one, sorry again). BTW, I don't know about the NZ function.

Regards

 

by: capricorn1Posted on 2004-06-24 at 11:16:41ID: 11391793




Nz Function

You can use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. For example, you can use this function to convert a Null value to another value and prevent it from propagating through an expression.

Nz(variant, [valueifnull])

The Nz function has the following arguments.

Argument Description
variant A variable of data type Variant.
valueifnull Optional (unless used in a query). A Variant that supplies a value to be returned if the variant argument is Null. This argument enables you to return a value other than zero or a zero-length string.
Note   If you use the Nz function in an expression in a query without using the valueifnull argument, the results will be a zero-length string in the fields that contain null values.
 


If the value of the variant argument is Null, the Nz function returns the number zero or a zero-length string (always returns a zero-length string when used in a query expression), depending on whether the context indicates the value should be a number or a string. If the optional valueifnull argument is included, then the Nz function will return the value specified by that argument if the variant argument is Null. When used in a query expression, the NZ function should always include the valueifnull argument,

If the value of variant isn't Null, then the Nz function returns the value of variant.

Remarks
The Nz function is useful for expressions that may include Null values. To force an expression to evaluate to a non-Null value even when it contains a Null value, use the Nz function to return zero, a zero-length string, or a custom return value.

For example, the expression 2 + varX will always return a Null value when the Variant varX is Null. However, 2 + Nz(varX) returns 2.

You can often use the Nz function as an alternative to the IIf function. For example, in the following code, two expressions including the IIf function are necessary to return the desired result. The first expression including the IIf function is used to check the value of a variable and convert it to zero if it is Null.

varTemp = IIf(IsNull(varFreight), 0, varFreight)
varResult = IIf(varTemp > 50, "High", "Low")
In the next example, the Nz function provides the same functionality as the first expression, and the desired result is achieved in one step rather than two.

varResult = IIf(Nz(varFreight) > 50, "High", "Low")
If you supply a value for the optional argument valueifnull, that value will be returned when variant is Null. By including this optional argument, you may be able to avoid the use of an expression containing the IIf function. For example, the following expression uses the IIf function to return a string if the value of varFreight is Null.

varResult = IIf(IsNull(varFreight), "No Freight Charge", varFreight)
In the next example, the optional argument supplied to the Nz function provides the string to be returned if varFreight is Null.

varResult = Nz(varFreight, "No Freight Charge")
Example
The following example evaluates a control on a form and returns one of two strings based on the control's value. If the value of the control is Null, the procedure uses the Nz function to convert a Null value to a zero-length string.

Public Sub CheckValue()

    Dim frm As Form
    Dim ctl As Control
    Dim varResult As Variant

    ' Return Form object variable pointing to Orders form.
    Set frm = Forms!Orders

    ' Return Control object variable pointing to ShipRegion.
    Set ctl = frm!ShipRegion

    ' Choose result based on value of control.
    varResult = IIf(Nz(ctl.Value) = vbNullString, _
        "No value.", "Value is " & ctl.Value & ".")

    ' Display result.
    MsgBox varResult, vbExclamation

End Sub

 

by: capricorn1Posted on 2004-06-24 at 11:19:41ID: 11391827

Normally you use NZ in a query like this

Sum:NZ(Field1,0)+NZ(Field2,0)

this will avoid the error if any of the fields in the expression is Null or empty.

try it by adding fields with no value

 

by: IUfoltziePosted on 2004-06-24 at 11:20:32ID: 11391842

and thats the query ones I build a third one....

SELECT qry_CMPM_actual_sumCG.[Work Type], qry_CMPM_actual_sumCG.Project_Application, qry_CMPM_actual_sumCG.[Cost Group ID], qry_CMPM_actual_sumCG.PIW, ((([qry_CMPM_actual_sumCG]![SumOfSum_January]+[qry_CMPM_actual_sumCG]![SumOfSum_Febuary]+[qry_CMPM_actual_sumCG]![SumOfSum_March]+[qry_CMPM_actual_sumCG]![SumOfSum_April]+[qry_CMPM_actual_sumCG]![SumOfSum_May])/152)/5) AS Actuals
FROM qry_CMPM_actual_sumCG;


It works clean enough.. I do get blanks where there isnt any data yet... I think I could change the default in the database to Zero for those fields. I just hope it cant be overwriten when I past the new hours data into the table.

 

by: IUfoltziePosted on 2004-06-24 at 11:39:07ID: 11392016

And once I applied the NZ function (thanks for the demo it worked)....

 

by: NestorioPosted on 2004-06-24 at 11:50:29ID: 11392144

Glad to hear that.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...