I am creating a small Access db which performs a series of updates to a SQL db.
The Access db consists of a ‘Main Form’, from which the user can run each update via a series of command buttons.
Each update has been written as a SQL pass-through query.
Example Update:
UPDATE unit_instance_o ccurrences uio
SET fes_active_plac es =
(SELECT COUNT(*) FROM registration_un its ru
WHERE ru.fes_unit_ins tance_code = uio.fes_uins_in stance_code
AND ru.uio_occurren ce_code = uio.calocc_occu rrence_code
AND ru.progress_sta tus = 'A'
AND ru.uio_occurren ce_code = 07);
Each query is dependant on a year (07) however I want the user to determine the year from a combo box on the ‘Main Form’.
How do I best go about this? If necessary I can rewrite the pass-through update queries as pure Access-update queries.
Have not been having much success as my VB knowledge is limited. Any help would be much appreciated. Many thanks.
The Access db consists of a ‘Main Form’, from which the user can run each update via a series of command buttons.
Each update has been written as a SQL pass-through query.
Example Update:
UPDATE unit_instance_o ccurrences uio
SET fes_active_plac es =
(SELECT COUNT(*) FROM registration_un its ru
WHERE ru.fes_unit_ins tance_code = uio.fes_uins_in stance_code
AND ru.uio_occurren ce_code = uio.calocc_occu rrence_code
AND ru.progress_sta tus = 'A'
AND ru.uio_occurren ce_code = 07);
Each query is dependant on a year (07) however I want the user to determine the year from a combo box on the ‘Main Form’.
How do I best go about this? If necessary I can rewrite the pass-through update queries as pure Access-update queries.
Have not been having much success as my VB knowledge is limited. Any help would be much appreciated. Many thanks.
Comment