Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't Want Parameter Prompt! 3

Status
Not open for further replies.

JOEYB99

Technical User
Joined
Jul 9, 2008
Messages
121
Location
CA
I'm using MS Access 2003. I use the Build function to sum two calculated sums - [sumofhours] + [sumofdays].

When I run my query it prompts me twice because of the square brackets. I click OK on these prompts and it gives me the correct results.

But how do I get rid of this parameter effect? It is annoying. Can someone please help me out?
 
What is your actual SQL code ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It sounds like you have an aggregate query (using group by and sum). If so, the column that you are doing the sum on change the Group By on the Total line in the query grid to Expression in the drop down box and that should take care of it.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
sounds like you are doing something like:
Code:
SELECT SUM(Hours) as SumOfHours, SUM(Days) As SumOfDays, SumOfHours - SumOfDays FROM TableName

you can't use an alias in the same query like that you have to do:

Code:
SELECT SUM(Hours) as SumOfHours, SUM(Days) As SumOfDays, SUM(Hours) - SUM(Days) As SomeOtherField FROM TableName

Leslie

Come join me at New Mexico Linux Fest!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top