View Full Version : NewBie Expression Builder Question


agentoblivion
11-09-2010, 11:41 AM
Hey guys,

I'm working with a report with record source [Table 1]. One of the fields within [Table 1] is [Price]

When in expression builder for a text box:

What is the difference between the expression "[Price]" and "[Table 1]![Price]"? I'm picturing them as being the same...

But I've found that I'm prompted for a parameter when I use "[Table 1]![Price]". Why is this?

I know this is due to my lack of understanding of how it works but I'm hoping someone will help me understand it better. My goal is to eventually reference [Table 2] values in the report but I figured I'd take it one step at a time.

Thank you,

Sarina

Trevor G
11-10-2010, 03:04 AM
Can you upload a sample of the database and point me to your report and tables I will take a look. Please state which version of Access you are using.

I don't completely understand your question.

On the report you have a textbox and its control source is Price is this correct? Then you want to create an expression to do what?

agentoblivion
11-11-2010, 05:49 AM
I've attached a sample database with the table and the report I'm working on creating.

The following is how I want to report to look like in the end:http://i51.tinypic.com/10zu0sj.png

I'm having a hard time using the expression builder to do the arithmetic for the "No. Not Selected" field based on information from the table.

Background information: The table in the sample db is actually a query from my original database. The table that the query is based on is a list of persons and their information, etc.

You'll see when you first open the report, it'll ask for a parameter. I'm confused by that.

Thanks for helping out.

- Sarina

Trevor G
11-11-2010, 06:02 AM
Sarina,

I have looked at your database and basically I have written a query to do the calculation and then set that to be used in the Report and added your totals.

See returned copy that works.

Look at the query and there is a simple expression in there.

agentoblivion
11-11-2010, 06:34 AM
Thanks so much, Trevor G. I appreciate it!

- Sarina

Trevor G
11-11-2010, 07:53 AM
Pleased to help.