setting the argument in SETVALUE Action of macro

T

taxedworker

Can I use a query as the argument to the SETVALUE in a macro?
I have use a query to calculate a CalcTotalScore from a table with several
fields; In a form based on this query and 2 tables would like to place the
calculated Total Score into a field in one of the tables.
When I set the query as the argument to the SetValue Action - I get an error
message- cannot recognise qry...- other forms and tables work but not the
queries
Any thought as to why this is so?
 
K

KARL DEWEY

SetValue pushes data. A query normally pulls data.
Maybe open form, set value of forms text box, use the text box in your query.
 
T

taxedworker

Excellent motto to follow_ thanks- but tried. It does not like that query
connection.
 
K

KARL DEWEY

It does not like that query connection.
Do you mean you can not run the query using the macro?

Re-reading your post I am not sure of what you are doing or how you are
attempting to do it.

1- It seems you have a query with calculated field and you want to place
that value into a field of a different table.
2- Do want to update that field of all records in that table or just one
record?

Why not just change your query to an Update query?
 
D

datamanipulator

I have a series of field descriptions that have been given numeric values;
these are entered into a table through a form.
The "Total Sum" of these descriptions needs to be reported on that form and
saved in the same table as the characteristics- all part of the same
record.The data comprises hundreds of records.
I used a query to calculate the Total Sum - this query is the base of my
form.
The query runs fine.
I used the control source for txt box txtTotalSum to be the TotalSum field
in the table and used a SetValue macro On Enter to set the txtTotalSum to be
the calculated queried value.
This is where the problem arises- the SETVALUE does not want to recognise
the queried field as the Expression for the item: txtTotalSum.
Thank you for your help
 
K

KARL DEWEY

Post the SQL of your query. Post the macro action, condition, and arguments.
 

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