473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Control Source on a Text Box

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
6 2252
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
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
-----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
Thanks!
Nov 12 '05 #5
Thanks!
Nov 12 '05 #6
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Billy Jacobs | last post by:
I have created a DataGridColumnDatePicker Component so that I can put a datetimepicker control in my datagrid. It almost works. When I put my mouse in the cell it changes to a datetimepicker...
5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
2
by: Bob | last post by:
I've got a bound report with a query as the record source. I'm adding a total to the footer and have inserted a text box to display it. I'm attempting to set the control source of the text box to...
0
by: Shane O. Pinnell | last post by:
I am sure this has come up before, but I haven't been able to find an answer as of yet. That said, any help is definitely appreciated! I have a datagrid populated from a dataset. I have a...
6
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a...
7
by: moondaddy | last post by:
I have a user control being used instead of a frame page. when the user clicks on a menu item I need to send the ID (integer value) of that menu as a parameter in the postback of the user control...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
0
by: nate | last post by:
the error returned is this: Server Error in '/AnnAccRpt' Application. -------------------------------------------------------------------------------- Could not find control 'DropDownList1' in...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.