Using a calculated field from a report in a Query (1 Viewer)

LHolden

Registered User.
Local time
Today, 05:08
Joined
Jul 18, 2012
Messages
73
Hi all!

Just wondering if it is possible to take a calculated field from a report and use it to populate a field on a query?

I imagine the name for the field would look something like FieldName: [reports]![rptName]![FieldName], but I haven't been able to get it to work, so I assume I'm doing something wrong or that this isn't possible.

Thanks!
 

plog

Banishment Pending
Local time
Today, 04:08
Joined
May 11, 2011
Messages
11,634
Why not just recreate the calculation in the query instead of trying to find it on the report?

If the calculation was the multiplication of two fields, then you would simply set up the query to multiply those two fields--you wouldn't do it on the report and then set the query to try and find it on the report.
 

RainLover

VIP From a land downunder
Local time
Today, 19:08
Joined
Jan 5, 2009
Messages
5,041
Is your form bound to a Query?
If so then it is simply a matter of placing the calculation in the Control's Property "Default Value"

Fields are in Tables and Queries not on Forms.

The equivilant for a Field on a Form is a Control. A Text Box is one type of Control.
 

vbaInet

AWF VIP
Local time
Today, 10:08
Joined
Jan 22, 2010
Messages
26,374
Just to clarify, fields are in forms, reports, queries and tables. With respect to forms and reports, fields are bound to controls.

So like plog and RainLover have said, you can repeat the calculation in the Control Source of your form (even though the field is not present in your form's Record Source). I suspect that you are looking for one of the aggregate functions (e.g. Sum(), Count() etc) or one of the domain aggregate functions (i.e. DSum(), DCount() etc). You use the domain aggregate functions when the data source is not the form's Record Source.
 

RainLover

VIP From a land downunder
Local time
Today, 19:08
Joined
Jan 5, 2009
Messages
5,041
Just to clarify, fields are in forms, reports, queries and tables.

I do not believe this to be correct.

Can you tell me where I find something called "Field" (MS Access Term) in a Form.
 

vbaInet

AWF VIP
Local time
Today, 10:08
Joined
Jan 22, 2010
Messages
26,374
There's more to that sentence which you cut out Rain ;)
 

RainLover

VIP From a land downunder
Local time
Today, 19:08
Joined
Jan 5, 2009
Messages
5,041
There's more to that sentence which you cut out Rain ;)

No I did not. A sentence ends with a Period. I copied the entire Sentence.
Every word of the sentence is still there unchanged.

If you want the balance of the line then you could have posted that.

Does it make a difference to my Statement that there are no Fields in Forrms.
 

plog

Banishment Pending
Local time
Today, 04:08
Joined
May 11, 2011
Messages
11,634
Yes, pedantic fights over semantics on the internet. This is better than bikini mud wrestling.
 

RainLover

VIP From a land downunder
Local time
Today, 19:08
Joined
Jan 5, 2009
Messages
5,041
Yes, pedantic fights over semantics on the internet. This is better than bikini mud wrestling.

Sorry plog, this one won't last long. I have been in some that put Bob and Col in the kiddy's play pen. :D
 

RainLover

VIP From a land downunder
Local time
Today, 19:08
Joined
Jan 5, 2009
Messages
5,041
Yes, pedantic fights over semantics on the internet. This is better than bikini mud wrestling.

Sorry Plog. No pig in mud this time.

VBA has taken his ball and gone home.:eek:
 

Users who are viewing this thread

Top Bottom