PC Review


Reply
Thread Tools Rate Thread

Coordinate status of checkbox on form to checkbox on multiple reco

 
 
DanRoy
Guest
Posts: n/a
 
      4th Sep 2008
I have a form where I relate one-to-many components referenced to a
ReferenceNo. Each of the "many" components has an hours value. I have a
text box on the form which automatically sums the "Many" hours values as a
sub-total from the individual hours summed from the "Many" detail records.
On the form, I have a control total from the cover sheet with the approved
hours. When the approved hours = Sum of (Many) hours, the checkbox is
checked. If the totals are not the same, then the checkbox is unchecked.

Whenever the checked staus of the checkbox changes, I want a checkbox in
each of the individual "many" records to follow the checked status of the
checkbox on the form.

All of the desired actions on the form are working as described. What does
not work follows:

In the underlying database, the records which comprise the "many" side have
a checkbox in the record structure. I want the checkbox for each of the
individual records to have the same checked/unchecked status as the checkbox
dewecribed in the first paragraph.

I have used the AfterUpdate event for the checkbox on the form to execute
this code

Check112.Value = DoCmd.OpenQuery(UpdateQuery, , acEdit)

The Update query (when executed manually) proiduces the desired but I
cannot get the event for the checkbox to trigger execution of the update
query Can you tell me whether the DoCMD format is incorrect, or am I using
the wrong event?

Update Query SQL follows:

UPDATE [BOE Update] SET [BOE Update].[DetailRecCheck] =
FORMS!BOE_Update_screen.check112
WHERE ((([BOE Update].[ReferenceNo])=[FORMS]![BOE_Update_screen].[text18]));
where text18 holds a ReferenceNo matching value

I want to set the checkboxes in the recordset to be the same as the checkbox
on the form, which indicates whether the sum of the "Many" hours equals the
sum on the top sheet of the form.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checkbox on form reset from checkbox on sheet raw Microsoft Excel Programming 1 3rd Dec 2005 05:08 AM
Checking the status of a checkbox in a user form =?Utf-8?B?UGV0ZXIgUm9vbmV5?= Microsoft Excel Programming 15 1st Nov 2005 03:59 PM
Checkbox on one form updates multiple checkboxes on another form Amy Adams via AccessMonster.com Microsoft Access Forms 1 2nd Feb 2005 05:24 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM
Multiple Inputs in a Form (Inputbox) - Checkbox aalwazeer@gistrans.com Microsoft Excel Discussion 1 25th Aug 2003 08:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:00 AM.