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?
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.