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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression Builder in access

Status
Not open for further replies.

guymason

Technical User
Apr 25, 2001
125
GB
I have a query with three columns taken from tables, in a fourth column I want to add these three values together. I added them using expression builder, but when I run the query all I get is a box requesting parameter values?
 
Hi guymason. The 4th column needs to be a calculated field. e.g. SELECT tblYourTableName.Field1, tblYourTableName.Field2, tblYourTableName.Field3, [Field1]+[Field2]+[Field3] AS Total
FROM tblYouirTableName;
 
This is what I thought I had done, from the expresssion builder I built in a fourth column =[OccScore]+[StoScore]+[RepScore].

OccScore etc are fields that I added from tables, if I run the query without the total, the OccScore etc are displayed correctly, but when I try to add them together it asks for parameters, but surely OccScore, StoScore and RepScore are the parameters?
 
TotalScore: [OccScore]+[StoScore]+[RepScore] MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Still brings up the 'parameter' box. Any ideas?
 
The only reason [b[this[/b[ will invoke the parameter dislog box would be one of the field names is NOT part of the recordsource for the query, or it is itself a calculated field in the query and is placed AFTER this calculated field in the query.

Of course, other fields in t he query may have problems/issues which are instantiating the parameter dialog box.

If it seems weird, go back to the basics. Cut your query down to JUST fields clearly in the recordsource(s). MAKE SURE by only dragging fields from the record source boxes and dropping them in the source row. Now, RUN the Query. When (IF?) it runs suessfully and witrhout parameter prompt(s), add the ONE (ONLY!) calculated field. Re-Run it. If there is a problem, It HAS to BE the FIELD NAMES!!!!!
MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top