Thanks Steve.
Your suggestion is what I've been trying but without succes.
My main form tacks the date and cheque number of cheques I'm writing. It has
three subforms each of which displays a different type of payment I can make
and the applicable payables. Each form has a check box where the user
indicates which bills are to be paid. Only unpaid nills are displayed in
these subforms.
The 4th subform is based on a query which totals the bills checked in the
other 3 subforms. So each time I click a checkbox I need it to prompt a
requery of the "total" query. However, I don't want to requery the subform
where the check mark is clicked otherwise that bill is eliminated from the
subform and hence the total (because the subforms only showed unpaid bills).
I have the checkbox runa macro after updating. THe macro is a simple Requey.
But no matter how I define the control to requery, an error message diplays.
The only control it will accept is one in the same subform as the checkbox
that triggers the macro. I don't knopw why Access won't let me trigger a
macro in one subform that affects a control in a sister subform. But when
you look at the macro for Requery, the spcae where you fill in the control
does not allow you to look up a control the way other macro instructions (eg.
set value) does. This seems to imply too that it only wants simple control
names from within the same form.
Any suggestion? (assuming I've not muddied the waters with this explanation).
Steve Schapel said:
FJ,
I have read your question over, trying to imagine what you are doing
that produces this requirement. I suppose the control on the other
subform must be a combobox or listbox, right?
But anyway, I guess your macro would be assigned on the After Update
event of the checkbox. I didn't test this, but I think the Control Name
argument would be set to the equivalent of:
[Parent]![OtherSubformName]![ControlOnOtherSubform]
--
Steve Schapel, Microsoft Access MVP
I have two separate subforms within one mainform. Using Macros only (because
I have no idea how to write code) how can I make the clicking of a check box
in one subform trigger the requery of a control in the other subform WITHOUT
triggering a requery of any other data in any of the forms?
Thanks.