Problem with update query, values come from Master & sub-form

R

rich

Hello,

In my application, I need to track employee's access to applications, based
upon their job role. Also, if a new job role is added, I need to associate
(or map) specific applications to the new job role. Applications are
catagorized by company (2 companies).

From the form to add a new role.........
After a new role is added (and saved), the subform is made visible. The
subform is based on a query which provides a list of applications, and a
checkbox to indicate whether or not to map the specific application.

The actual mapping is done by inserting 1 row for each application into a
mapping table. This table has a rolename and an application ID. Form and
table details:

MstrFrm: This is the form for adding a new role.
CompanyName: cbobox
NewRoleName: txtbox

Sub-form: This form is based on 1 table and will have multiple rows
containing:
CompanyName: from master form. There are 2 companies.
Application Name
Checkbox indicating whether or not to map this application to the new role.

When the form is opened, the sub-form is disabled and not visable.
When the form is opened, there is an immediate prompt for Me.cboCompanyName
from the master form. Form is not open yet. I don't want this prompt.
Company is selected and new Role name is entered. This is then saved
correctly.
Sub-form is enabled, re-queried and made visible. The requery caused
another prompt for Me.cboCompanyName (from master form). The subform is then
displayed with correct data.

User then selects checkboxes for applications to be mapped and clicks "Map
New Role" button.

At this point, I'm unsure how to proceed. Should the subform update its
table after each checkbox is updated, or should the table be updated in one
swoop when the "Map New Role" button is clicked? Either way, the updates
must be performed. After all updates, an Insert query is executed to add 1
new row to the mapping table for each row that was just updated to indicate
that specific application is to be mapped to the new role.

My apologies for the length of this posting, I just wanted to include all
the details.


thanks in advance,
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top