Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to cover over a calculation field from one form to another

Posted on 2015-01-15
9
Medium Priority
?
108 Views
Last Modified: 2015-01-15
How do you code or select a calculation field from one form to another??
0
Comment
Question by:Jass Saini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40551755
Lets presume a textbox named "txtCalc" on Form 1 has your calculation, and you need that same calculation in form 2, in a textbox names txtCalc2.

In form 2 make the control source of the textbox (txtCalc2):
=Forms!Form1!txtCalc
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40551766
The kicker here is that Form1 must always be open in order for this to work....

The better approach would be to create a function that does the calculation, ...then simply call he function on each form...
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 40551827
A function could be used anywhere in your app. (on another form, a report, ...a query)
  (or be portable to another App)
a sample of a (Public) function is attached.
The other good thing is that if you use the function in a query, then you can use that query as the source for other forms and reports (and there may not be a need t reference the function again...)

;-)

JeffCoachman
Database52.mdb
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Comment

by:Jass Saini
ID: 40551845
Hello Jeff,

I understand that...but the fields are different for function...the end result on the form is what I need to capture on the next form.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40551853
...then my first post should work...
0
 

Author Closing Comment

by:Jass Saini
ID: 40551925
Thanks
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40551968
;-)
0
 

Author Comment

by:Jass Saini
ID: 40551969
Hello Jeff,

I looked at the DB and what is a Double?  I woul have to define all the fields that I need for that calcualtion?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40552667
what is a Double?
You can look at the Access help files on "Field Size"
Field SizeBasically they are numbers that can be up to 15 decimals...
I picked that so that if you had decimals, ...calculated values could float the decimal.

I woul have to define all the fields that I need for that calcualtion?
Not sure what you mean, ...but any argument you supplied to the function would have to fit in the parameters of a double number...
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question