By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 1,009 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

Control Source on a Text Box

P: n/a
I've created some fields that calculate future dates. The way they are
set up they do not save to a table. This is the expression I used
(=DateSerial(Year([IFSPOrginal]),Month([IFSPOrginal])+6,Day([IFSPOrginal]).
I placed it in the Control Source property. I want to save them to a
table so I can use them on a report.

So the 2 questions are:

1. How do you use a calculated field that doesn't save to a table in
a report?

2. If you have to save it to a table to use it in a report, where do
I put the expression so it does the calculation other than control
source property?

Thanks
Mark
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 26 Feb 2004 11:04:52 -0800, Mark Lees wrote:
I've created some fields that calculate future dates. The way they are
set up they do not save to a table. This is the expression I used
(=DateSerial(Year([IFSPOrginal]),Month([IFSPOrginal])+6,Day([IFSPOrginal]).
I placed it in the Control Source property. I want to save them to a
table so I can use them on a report.

So the 2 questions are:

1. How do you use a calculated field that doesn't save to a table in
a report?

2. If you have to save it to a table to use it in a report, where do
I put the expression so it does the calculation other than control
source property?

Thanks
Mark


Regarding #1, above:
You don't save the calculated field to a table, you repeat the same
calculation in the report.
As long as your table contains the data in the fields used in the
calculations, that's all you need.

Regarding #2, above:
See my response to #1.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2

P: n/a
Mark Lees wrote:
I've created some fields that calculate future dates. The way they are
set up they do not save to a table. This is the expression I used
(=DateSerial(Year([IFSPOrginal]),Month([IFSPOrginal])+6,Day([IFSPOrginal]).
I placed it in the Control Source property. I want to save them to a table so I can use them on a report.
You may assume that a report can be built on a table only. That is not
the case: you can use a query as source for the report. That happens to
be frequent use.
So the 2 questions are:

1. How do you use a calculated field that doesn't save to a table in
a report?
In a query. Or, immediately on the report: ou can set the controlsource
of report fields just as you set them in forms.
2. If you have to save it to a table to use it in a report, where do
I put the expression so it does the calculation other than control
source property?


It is so much advised against, that I couldn't even provide a technical
answer. Just don't store the calculated value.
--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #3

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First off, you can use the DateAdd() function to add 6 months to the
date value IFSPOriginal:

DateAdd("m", 6, IFSPOriginal)

If the date IFSPOriginal is saved to the table you can use the same
function in the report. Use an unbound TextBox and set its
ControlSource to this:

=DateAdd("m", 6, [IFSPOriginal])
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQD5KIoechKqOuFEgEQJboQCgyHxsDYcCz9HnP2q6vzEm30 pnwF4An27A
fhqZr+nTo3uqW7Y56SvTL5XF
=LrYG
-----END PGP SIGNATURE-----
Mark Lees wrote:
I've created some fields that calculate future dates. The way they are
set up they do not save to a table. This is the expression I used
(=DateSerial(Year([IFSPOrginal]),Month([IFSPOrginal])+6,Day([IFSPOrginal]).
I placed it in the Control Source property. I want to save them to a
table so I can use them on a report.

So the 2 questions are:

1. How do you use a calculated field that doesn't save to a table in
a report?

2. If you have to save it to a table to use it in a report, where do
I put the expression so it does the calculation other than control
source property?


Nov 12 '05 #4

P: n/a
Thanks!
Nov 12 '05 #5

P: n/a
Thanks!
Nov 12 '05 #6

P: n/a
MGFoster:

Thanks for the help. However if I set it up with the DateAdd function
it asks me for a parameter value and bases the results from the
parameter value and not the one stored in IFSPOrignal.

MGFoster <me@privacy.com> wrote in message news:<PS*****************@newsread2.news.pas.earth link.net>...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First off, you can use the DateAdd() function to add 6 months to the
date value IFSPOriginal:

DateAdd("m", 6, IFSPOriginal)

If the date IFSPOriginal is saved to the table you can use the same
function in the report. Use an unbound TextBox and set its
ControlSource to this:

=DateAdd("m", 6, [IFSPOriginal])
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQD5KIoechKqOuFEgEQJboQCgyHxsDYcCz9HnP2q6vzEm30 pnwF4An27A
fhqZr+nTo3uqW7Y56SvTL5XF
=LrYG
-----END PGP SIGNATURE-----
Mark Lees wrote:
I've created some fields that calculate future dates. The way they are
set up they do not save to a table. This is the expression I used
(=DateSerial(Year([IFSPOrginal]),Month([IFSPOrginal])+6,Day([IFSPOrginal]).
I placed it in the Control Source property. I want to save them to a
table so I can use them on a report.

So the 2 questions are:

1. How do you use a calculated field that doesn't save to a table in
a report?

2. If you have to save it to a table to use it in a report, where do
I put the expression so it does the calculation other than control
source property?

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.