Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: updating control

Geek News

updating control
Gator 11/25/2008 8:42:12 PM
I have a textbox on a form that is a calculating control that sums the
amounts from about ten different textboxes. How can I get the calculating
control to automatically update each time there is a change in one of the
other textboxes??
thanks
RE: updating control
Beetle 11/25/2008 9:06:02 PM
What is the control source of your calculate control?
--
_________

Sean Bailey


"Gator" wrote:

[Quoted Text]
> I have a textbox on a form that is a calculating control that sums the
> amounts from about ten different textboxes. How can I get the calculating
> control to automatically update each time there is a change in one of the
> other textboxes??
> thanks
RE: updating control
Gator 11/25/2008 9:21:03 PM
=DSum("[08pt]","Collections","[DatePd]=txtDate")

"Beetle" wrote:

[Quoted Text]
> What is the control source of your calculate control?
> --
> _________
>
> Sean Bailey
>
>
> "Gator" wrote:
>
> > I have a textbox on a form that is a calculating control that sums the
> > amounts from about ten different textboxes. How can I get the calculating
> > control to automatically update each time there is a change in one of the
> > other textboxes??
> > thanks
RE: updating control
Beetle 11/25/2008 10:40:09 PM
Maybe you can clarify what you're doing because that control source
does not "sum the amounts from ten different text boxes". It returns
the sum of one field ([08pt]) from a table or query for each record that
contains certain date criteria. It could be that "Collections" is a query and
that [08pt] is a calculated field in that query that sums ten other fields,
but I don't really know.
--
_________

Sean Bailey


"Gator" wrote:

[Quoted Text]
> =DSum("[08pt]","Collections","[DatePd]=txtDate")
>
> "Beetle" wrote:
>
> > What is the control source of your calculate control?
> > --
> > _________
> >
> > Sean Bailey
> >
> >
> > "Gator" wrote:
> >
> > > I have a textbox on a form that is a calculating control that sums the
> > > amounts from about ten different textboxes. How can I get the calculating
> > > control to automatically update each time there is a change in one of the
> > > other textboxes??
> > > thanks
RE: updating control
Gator 11/26/2008 3:42:01 PM
The form opens with several textboxes (blank) waiting on numbers to be
entered. When a number is entered into one of the textboxes, the control
below updates to include that number. I'm not sure if it should be a
LostFocus, Update or some other event. As it stands now, the control is
blank until I move to a different record and then go back....then it shows
the DSUM.

=DSum("Nz([07pt],0) + Nz([06pt],0) + Nz([05pt],0)","Collections","[DatePd]
=txtDate")

thanks

"Beetle" wrote:

[Quoted Text]
> Maybe you can clarify what you're doing because that control source
> does not "sum the amounts from ten different text boxes". It returns
> the sum of one field ([08pt]) from a table or query for each record that
> contains certain date criteria. It could be that "Collections" is a query and
> that [08pt] is a calculated field in that query that sums ten other fields,
> but I don't really know.
> --
> _________
>
> Sean Bailey
>
>
> "Gator" wrote:
>
> > =DSum("[08pt]","Collections","[DatePd]=txtDate")
> >
> > "Beetle" wrote:
> >
> > > What is the control source of your calculate control?
> > > --
> > > _________
> > >
> > > Sean Bailey
> > >
> > >
> > > "Gator" wrote:
> > >
> > > > I have a textbox on a form that is a calculating control that sums the
> > > > amounts from about ten different textboxes. How can I get the calculating
> > > > control to automatically update each time there is a change in one of the
> > > > other textboxes??
> > > > thanks
RE: updating control
Beetle 11/26/2008 4:21:01 PM
If you are just trying to calculate the sum of several fields from
the same record, you don't necessarily need to use DSum. You can
use a calculated control in the detail section of your form with a
control source like;

=([Field1]+[Field2]+[Field3]+[Field4])

which will update itself as you move from field to field within the record.
--
_________

Sean Bailey


"Gator" wrote:

[Quoted Text]
> The form opens with several textboxes (blank) waiting on numbers to be
> entered. When a number is entered into one of the textboxes, the control
> below updates to include that number. I'm not sure if it should be a
> LostFocus, Update or some other event. As it stands now, the control is
> blank until I move to a different record and then go back....then it shows
> the DSUM.
>
> =DSum("Nz([07pt],0) + Nz([06pt],0) + Nz([05pt],0)","Collections","[DatePd]
> =txtDate")
>
> thanks
>
> "Beetle" wrote:
>
> > Maybe you can clarify what you're doing because that control source
> > does not "sum the amounts from ten different text boxes". It returns
> > the sum of one field ([08pt]) from a table or query for each record that
> > contains certain date criteria. It could be that "Collections" is a query and
> > that [08pt] is a calculated field in that query that sums ten other fields,
> > but I don't really know.
> > --
> > _________
> >
> > Sean Bailey
> >
> >
> > "Gator" wrote:
> >
> > > =DSum("[08pt]","Collections","[DatePd]=txtDate")
> > >
> > > "Beetle" wrote:
> > >
> > > > What is the control source of your calculate control?
> > > > --
> > > > _________
> > > >
> > > > Sean Bailey
> > > >
> > > >
> > > > "Gator" wrote:
> > > >
> > > > > I have a textbox on a form that is a calculating control that sums the
> > > > > amounts from about ten different textboxes. How can I get the calculating
> > > > > control to automatically update each time there is a change in one of the
> > > > > other textboxes??
> > > > > thanks
RE: updating control
Gator 11/26/2008 5:40:00 PM
How right you are....thanks for clearing the clutter

"Beetle" wrote:

[Quoted Text]
> If you are just trying to calculate the sum of several fields from
> the same record, you don't necessarily need to use DSum. You can
> use a calculated control in the detail section of your form with a
> control source like;
>
> =([Field1]+[Field2]+[Field3]+[Field4])
>
> which will update itself as you move from field to field within the record.
> --
> _________
>
> Sean Bailey
>
>
> "Gator" wrote:
>
> > The form opens with several textboxes (blank) waiting on numbers to be
> > entered. When a number is entered into one of the textboxes, the control
> > below updates to include that number. I'm not sure if it should be a
> > LostFocus, Update or some other event. As it stands now, the control is
> > blank until I move to a different record and then go back....then it shows
> > the DSUM.
> >
> > =DSum("Nz([07pt],0) + Nz([06pt],0) + Nz([05pt],0)","Collections","[DatePd]
> > =txtDate")
> >
> > thanks
> >
> > "Beetle" wrote:
> >
> > > Maybe you can clarify what you're doing because that control source
> > > does not "sum the amounts from ten different text boxes". It returns
> > > the sum of one field ([08pt]) from a table or query for each record that
> > > contains certain date criteria. It could be that "Collections" is a query and
> > > that [08pt] is a calculated field in that query that sums ten other fields,
> > > but I don't really know.
> > > --
> > > _________
> > >
> > > Sean Bailey
> > >
> > >
> > > "Gator" wrote:
> > >
> > > > =DSum("[08pt]","Collections","[DatePd]=txtDate")
> > > >
> > > > "Beetle" wrote:
> > > >
> > > > > What is the control source of your calculate control?
> > > > > --
> > > > > _________
> > > > >
> > > > > Sean Bailey
> > > > >
> > > > >
> > > > > "Gator" wrote:
> > > > >
> > > > > > I have a textbox on a form that is a calculating control that sums the
> > > > > > amounts from about ten different textboxes. How can I get the calculating
> > > > > > control to automatically update each time there is a change in one of the
> > > > > > other textboxes??
> > > > > > thanks

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net