Re: Help with form/subform problem?
- From: Bob Quintal <rquintal@xxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 00:21:40 GMT
"Ron" <ronSPAMBLOCKERwest777@xxxxxxxxxxxxx> wrote in
news:1gZWf.10413$Bj7.8923@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Thanks Bob, that took care of my problem. I removed theThank you for the positive feedback. Glad to have helped. I
subform and put a new textbox as you suggested. Works great!
I think when I initially did this main form I was all excited
about forms/subforms and thought that was the best way to do
this.
Your solution works great though, so I switched everything
around.
Thanks again!
ron
sometimes look at an application I did long ago, and wonder why
I did something in such a convoluted fashion.
Then I remind myself of having learned a better way. I suppose
in five years I'll look at my current creations and say, ewwww,
that was clumsy. Life is a learning experience..
"Bob Quintal" <rquintal@xxxxxxxxxxxx> wrote in message
news:Xns9795DC9BE5B9BQuintal@xxxxxxxxxxxxxxxxx
"Ron" <ronSPAMBLOCKERwest777@xxxxxxxxxxxxx> wrote in
news:WiHWf.6308$HW2.2800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Hi All,Have you used the correct method of referring to the
I've got a form called frmCust that has a subform on it
called sfrmBalance. sfrmBalance's control source is a query
called qryTrans4CustBal. sfrmBalance has one field on it
called fldTransTotal where the control source is
=Sum([LineTotal]). LineTotal is derived from Quantity *
Amount in the above query.
I have a checkbox called chkActive on frmCust that I want to
allow the operators to uncheck only if the balance of the
customer is zero. How can I code that, and where do I put
the code so that it keeps them from changing that checkmark
if the customer's balance is NOT zero. I thought I'd just
enable = false that check box if balance isn't zero, but no
way, no how can I get the fldTransTotal to be anything but
empty (as seen by the main form frmCust). Yet, it looks
fine on the form/subform when viewed and has either a valid
balance or an actual 0.
Help! Help! Thanks in advance,
ron
subform's textbox? it must be addressed indirectly as
Forms!frmCust!sfrmBalance.Form!fldTransTotal.value
sometimes me. equals Forms!frmCust but sometimes that doesn't
work.
I'd put the code in the checkbox's BeforeUpdate event so that
a non zero balance can force cancellation of the update.
But if fldTransTotal is the only field on the subform, why
use a subform at all? Just use a DSum() function call as
control source on a textbox directly on the mainform.
Then you could easily make the checkbox enabled based on the
value of the textbox.
--
Bob Quintal
PA is y I've altered my email address.
--
Bob Quintal
PA is y I've altered my email address.
.
- References:
- Help with form/subform problem?
- From: Ron
- Re: Help with form/subform problem?
- From: Bob Quintal
- Re: Help with form/subform problem?
- From: Ron
- Help with form/subform problem?
- Prev by Date: Re: if table exist
- Next by Date: Re: if table exist
- Previous by thread: Re: Help with form/subform problem?
- Next by thread: Combo boxes for Form Query
- Index(es):
Relevant Pages
|
Loading