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_occurrences uioEach query is dependant on a year (Eg: 07) however I want the user to determine that year from a combo box on the ‘Main Form’.
SET fes_active_places =
(SELECT COUNT(*) FROM registration_units ru
WHERE ru.fes_unit_instance_code = uio.fes_uins_instance_code
AND ru.uio_occurrence_code = uio.calocc_occurrence_code
AND ru.progress_status = 'A'
AND ru.uio_occurrence_code = 07);
How do I best go about this?
The key thing is that i want to be able to run my pass through query from a button on the form. Before clicking the button the user must select the year. Somehow I either want to be able to insert that year as a parameter into the body of the PTQ or if necessary I can rewrite the pass-through update queries as pure Access-update queries and insert it there instead.
Have pretty much hit a wall with this so any help would be greatly appreciated!