Name a text field containing formulas

9

9568dc

I created a text field on a form that contains a formula. I did this a
second time. Now I want to calculate the two fields in a third field without
typing out all of the two formulas. I only want to use the name of the two
fields. How do I name the two fields?
 
D

Dirk Goldgar

9568dc said:
I created a text field on a form that contains a formula. I did this a
second time. Now I want to calculate the two fields in a third field
without
typing out all of the two formulas. I only want to use the name of the two
fields. How do I name the two fields?


I don't quite follow you, David. The calculated controls you created have
names -- Access would have assigned them names when they were created, and
either you subsequently renamed them or they still have the original names.
Check the Name property of each control, which will be found on the Other
tab of the control's property sheet in design view. Those are the names you
should use.
 
S

Steve

You can name them anything youy want (except reserved words) then put the
mathmatical expression you need to calculate the two fields in the control
source of the third field. Example in control source of third textbox:
=[Formula1] + [Formula2]
Where Formula1 is the name of the first textbox and Formula2 is the name of
the second textbox.

Steve
(e-mail address removed)
 
K

KARL DEWEY

This is the typical case of 'chicken and egg - which came first'.
When you did your calculation you gave them aliases and now want to use them
instead of the orignal math.

If Access in processing your SQL statement comes upon the alias before it is
create then it is an unknown so far as it is concerned.

It seems to me that Access processes the SQL from the bottom up - not real
sure if it hold true all the time.

If your SQL was written like this it might function --
SELECT [Alias_1] + [Alias_2] AS [Alias_3), [Field_1] * 1.5 AS [Alias_1],
[Field_2] + 0.015 AS [Alias_2]
FROM YourTable;

But if your SQL was written like this it might not function --
SELECT [Field_1] * 1.5 AS [Alias_1], [Field_2] + 0.015 AS [Alias_2],
[Alias_1] + [Alias_2] AS [Alias_3)
FROM YourTable;
 

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

Similar Threads

Dlookup 7
Hyperlink 1
Calculate field with input from different table 5
Importing Text Files Into Access 1
What Formula Can I use 2
Filtering Dates 3
Concatenation on two fields 10
Access Table match or lookup or other method 0

Top