L
laurajayne.cozens
Help! I am trying to write a query in access VBA. The query is doing
a count and inserting the figures into lots of different sub tables.
After all the counts are done, I want an update statement to update
one big table with all the figures.
The current code is:
DoCmd.RunSQL "UPDATE S_OFSTED_A SET ALL_ASD = (SELECT CountOfUNIQUE_ID
FROM S_OFSTED_ALL, S_OFSTED_A WHERE S_OFSTED_ALL.Eth_id =
S_OFSTED_A.Eth_id) "
S_Ofsted_A is my main table. It has a list of different ethnicitys
which each have an id. The table S_Ofsted_ALL contains all the count
firgures for the ofsted code 'ASD'. I want to populate the collum
ALL_ASD with the figures from S_OFSTED_ALL where the ethnicity fields
equal each other - so that for each ethnicity I am getting several
different figures.
Am I going about this completely the wrong way? Currently, when i run
this code i get runtime error 3073: Operation must use an updateable
query!!
What am i doing wrong?
Thanks for your help!
Laura
a count and inserting the figures into lots of different sub tables.
After all the counts are done, I want an update statement to update
one big table with all the figures.
The current code is:
DoCmd.RunSQL "UPDATE S_OFSTED_A SET ALL_ASD = (SELECT CountOfUNIQUE_ID
FROM S_OFSTED_ALL, S_OFSTED_A WHERE S_OFSTED_ALL.Eth_id =
S_OFSTED_A.Eth_id) "
S_Ofsted_A is my main table. It has a list of different ethnicitys
which each have an id. The table S_Ofsted_ALL contains all the count
firgures for the ofsted code 'ASD'. I want to populate the collum
ALL_ASD with the figures from S_OFSTED_ALL where the ethnicity fields
equal each other - so that for each ethnicity I am getting several
different figures.
Am I going about this completely the wrong way? Currently, when i run
this code i get runtime error 3073: Operation must use an updateable
query!!
What am i doing wrong?
Thanks for your help!
Laura