setting the argument in SETVALUE Action of macro

  • Thread starter Thread starter taxedworker
  • Start date Start date
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?
 
SetValue pushes data. A query normally pulls data.
Maybe open form, set value of forms text box, use the text box in your query.
 
Excellent motto to follow_ thanks- but tried. It does not like that query
connection.
 
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?
 
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
 
Back
Top