By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

Inserting a value from an Access form into a SQL pass through query

P: 94
I am creating a small Access db which performs a series of updates to an SQL database.

The 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 uio
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);

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.
Sep 11 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.