Sum of Function

M

Mike

Hi Again,

Since I should not try to save a calculated field, how can I sum a function
in my form?

The function uses PC Miler to determine the distance between points. I need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the textbox I use
for it.

Mike
 
G

Guest

Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])
 
M

Mike

1. Miles is a function
2. I want to sum the results of the function. Text24 is the zip from the
prior stop found via a dlookup.
3. It is in a form called "Stop Order" (I know about the space now I should
have named StopOrder), which is a subform of "Loads" linked by LoadNumber

Thanks for asking!

Klatuu said:
Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Mike said:
Hi Again,

Since I should not try to save a calculated field, how can I sum a function
in my form?

The function uses PC Miler to determine the distance between points. I need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the textbox I use
for it.

Mike
 
G

Guest

Okay, thanks for the additional info. Is this a continuous form? Basically,
what we need to know is what records are to be included in the sum. Once we
have the rule on what is included, we can come up with an answer.

Mike said:
1. Miles is a function
2. I want to sum the results of the function. Text24 is the zip from the
prior stop found via a dlookup.
3. It is in a form called "Stop Order" (I know about the space now I should
have named StopOrder), which is a subform of "Loads" linked by LoadNumber

Thanks for asking!

Klatuu said:
Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Mike said:
Hi Again,

Since I should not try to save a calculated field, how can I sum a function
in my form?

The function uses PC Miler to determine the distance between points. I need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the textbox I use
for it.

Mike
 
M

Mike

Yes, the subform is continuous. The main form is not.

I want to sum all of them in the subform for the one main form record. Does
that make sense?

Thanks again for your help!
Mike


Klatuu said:
Okay, thanks for the additional info. Is this a continuous form? Basically,
what we need to know is what records are to be included in the sum. Once we
have the rule on what is included, we can come up with an answer.

Mike said:
1. Miles is a function
2. I want to sum the results of the function. Text24 is the zip from the
prior stop found via a dlookup.
3. It is in a form called "Stop Order" (I know about the space now I should
have named StopOrder), which is a subform of "Loads" linked by LoadNumber

Thanks for asking!

Klatuu said:
Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

:

Hi Again,

Since I should not try to save a calculated field, how can I sum a function
in my form?

The function uses PC Miler to determine the distance between points.
I
need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the textbox
I
use
for it.

Mike
 
G

Guest

Mike,
Thanks for providing all the info. One approach I can think of would be to
use a query as the record source for your form instead of the table. Add a
column to the query that would contain your calculation. Then, I think you
could do a Dsum on the query.
I will have to admit this is a weak point for me, so someone else may have a
better answer.

Mike said:
Yes, the subform is continuous. The main form is not.

I want to sum all of them in the subform for the one main form record. Does
that make sense?

Thanks again for your help!
Mike


Klatuu said:
Okay, thanks for the additional info. Is this a continuous form? Basically,
what we need to know is what records are to be included in the sum. Once we
have the rule on what is included, we can come up with an answer.

Mike said:
1. Miles is a function
2. I want to sum the results of the function. Text24 is the zip from the
prior stop found via a dlookup.
3. It is in a form called "Stop Order" (I know about the space now I should
have named StopOrder), which is a subform of "Loads" linked by LoadNumber

Thanks for asking!

Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

:

Hi Again,

Since I should not try to save a calculated field, how can I sum a
function
in my form?

The function uses PC Miler to determine the distance between points. I
need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the textbox I
use
for it.

Mike
 
J

Jordan

Wouldn't the total miles just be the point where you ended (the last Text24
in the last record) minus the point where you started (zip in the first
record?

You would just have to have a text box with the Dlookup for the first zip
and another with a Dlookup for the last Text24.


Klatuu said:
Mike,
Thanks for providing all the info. One approach I can think of would be
to
use a query as the record source for your form instead of the table. Add
a
column to the query that would contain your calculation. Then, I think
you
could do a Dsum on the query.
I will have to admit this is a weak point for me, so someone else may have
a
better answer.

Mike said:
Yes, the subform is continuous. The main form is not.

I want to sum all of them in the subform for the one main form record.
Does
that make sense?

Thanks again for your help!
Mike


Klatuu said:
Okay, thanks for the additional info. Is this a continuous form? Basically,
what we need to know is what records are to be included in the sum.
Once we
have the rule on what is included, we can come up with an answer.

:

1. Miles is a function
2. I want to sum the results of the function. Text24 is the zip from the
prior stop found via a dlookup.
3. It is in a form called "Stop Order" (I know about the space now I should
have named StopOrder), which is a subform of "Loads" linked by LoadNumber

Thanks for asking!

Questions:
1. What is miles, A function, a Sub, etc?
2. What are you trying to sum?
3. Is this in a query?

If you can post more specific info, we cah give a better answer.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

:

Hi Again,

Since I should not try to save a calculated field, how can I sum
a
function
in my form?

The function uses PC Miler to determine the distance between
points. I
need
the sum for multiple point runs.

miles(IIf(IsNull([Zip]),[Text24],[zip]),[Text24])

Can I sum this? I tried DSum on both this function and the
textbox I
use
for it.

Mike
 

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