A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculated field



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2008, 05:15 PM posted to microsoft.public.access.queries
cesar
external usenet poster
 
Posts: 42
Default Calculated field

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks
--
Cesar
  #2  
Old October 27th, 2008, 05:49 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Calculated field

Sales Commission: [sales value] * [Enter percent of commission like 11.9
]/100
--
KARL DEWEY
Build a little - Test a little


"Cesar" wrote:

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks
--
Cesar

  #3  
Old October 27th, 2008, 05:51 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Calculated field

Cesar

It sounds like you are asking for a way to prompt the user for a percentage
(of commission) whenever the query runs.

You can use a "parameter prompt" (see Access HELP) to do this by putting
something like:

[Percent of Commission]

in the calculated field -- when Access can't find this, it uses it to
prompt.

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Cesar" wrote in message
...
I'm new using Access, so this may be pretty easy but I can figure outhow
to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the
percent
of commision is not a value in a table as the sales value is; this percent
of
commission is a changable value and actually I would like to be ask what
is
that percent every time I run the query

Thanks
--
Cesar



  #4  
Old October 27th, 2008, 05:56 PM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default Calculated field

On Mon, 27 Oct 2008 10:15:01 -0700, Cesar wrote:

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks


All the records in the query will have the same % commission?

SalesCommission:[SalesValue] * [Enter the commission as a decimal]

Enter .06 when prompted if the commission rate is 6%
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #5  
Old October 27th, 2008, 06:07 PM posted to microsoft.public.access.queries
cesar
external usenet poster
 
Posts: 42
Default Calculated field

Hi all,

Thanks for the answer, that's what exactly I meant. I created the field
using the brackets to ask me for the Percent of Commission, I worked exactly
the way I wanted,

Thank you very much,

Have a good day,
--
Cesar


"Jeff Boyce" wrote:

Cesar

It sounds like you are asking for a way to prompt the user for a percentage
(of commission) whenever the query runs.

You can use a "parameter prompt" (see Access HELP) to do this by putting
something like:

[Percent of Commission]

in the calculated field -- when Access can't find this, it uses it to
prompt.

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Cesar" wrote in message
...
I'm new using Access, so this may be pretty easy but I can figure outhow
to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the
percent
of commision is not a value in a table as the sales value is; this percent
of
commission is a changable value and actually I would like to be ask what
is
that percent every time I run the query

Thanks
--
Cesar




  #6  
Old October 27th, 2008, 06:12 PM posted to microsoft.public.access.queries
cesar
external usenet poster
 
Posts: 42
Default Calculated field

Thanks Fred,

So far yes, all the records will have the same % of commission, but just for
curiosity, what do I need to do if the % of commission depends on the Sales
value, let's say above 10,000 the percentage will be 7% and below the 10,000
the percentage will be 6.5%?

When I run the query it prompts me for the commision rate
--
Cesar


"fredg" wrote:

On Mon, 27 Oct 2008 10:15:01 -0700, Cesar wrote:

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks


All the records in the query will have the same % commission?

SalesCommission:[SalesValue] * [Enter the commission as a decimal]

Enter .06 when prompted if the commission rate is 6%
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #7  
Old October 27th, 2008, 06:21 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Calculated field

If you do not enter data at the prompt but just press ENTER it will calculate
commission based on sales volume.
Sales Commission: IIF([Enter percent of commission like 11.9 ] Is Not
Null, [sales value] * [Enter percent of commission like 11.9 ]/100,
IIF([sales value] 10,000, [sales value]* .065, [sales value]* .07))

--
KARL DEWEY
Build a little - Test a little


"Cesar" wrote:

Thanks Fred,

So far yes, all the records will have the same % of commission, but just for
curiosity, what do I need to do if the % of commission depends on the Sales
value, let's say above 10,000 the percentage will be 7% and below the 10,000
the percentage will be 6.5%?

When I run the query it prompts me for the commision rate
--
Cesar


"fredg" wrote:

On Mon, 27 Oct 2008 10:15:01 -0700, Cesar wrote:

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks


All the records in the query will have the same % commission?

SalesCommission:[SalesValue] * [Enter the commission as a decimal]

Enter .06 when prompted if the commission rate is 6%
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #8  
Old October 27th, 2008, 06:50 PM posted to microsoft.public.access.queries
cesar
external usenet poster
 
Posts: 42
Default Calculated field

Don't know if this is a duplicate but I don't know if the previous went thru,
Thanks, very helpul. Now here it is the real problem, It did work perfect in
Access but now I'm in EXCEL using a Microsoft Query to pull data from a SQL
database. The scenario is the same, need to calculate the new field by
multiplying the sales values times the % of commission which should be asked
every time I run the query. I tried in the same way creating the new field
but I got a message that says Invalid column name, If a use a constant, it
runs perfect, but since that value is going to change how can I make the
query to ask me for this % every time I run it?
Remember I'm in escel using microsoft query

Thanks again
Cesar


"KARL DEWEY" wrote:

If you do not enter data at the prompt but just press ENTER it will calculate
commission based on sales volume.
Sales Commission: IIF([Enter percent of commission like 11.9 ] Is Not
Null, [sales value] * [Enter percent of commission like 11.9 ]/100,
IIF([sales value] 10,000, [sales value]* .065, [sales value]* .07))

--
KARL DEWEY
Build a little - Test a little


"Cesar" wrote:

Thanks Fred,

So far yes, all the records will have the same % of commission, but just for
curiosity, what do I need to do if the % of commission depends on the Sales
value, let's say above 10,000 the percentage will be 7% and below the 10,000
the percentage will be 6.5%?

When I run the query it prompts me for the commision rate
--
Cesar


"fredg" wrote:

On Mon, 27 Oct 2008 10:15:01 -0700, Cesar wrote:

I'm new using Access, so this may be pretty easy but I can figure outhow to
do it.

I need to calculate a new field (sales commisions) just multiplying the
sales value times the percent of commission, the problem is that the percent
of commision is not a value in a table as the sales value is; this percent of
commission is a changable value and actually I would like to be ask what is
that percent every time I run the query

Thanks

All the records in the query will have the same % commission?

SalesCommission:[SalesValue] * [Enter the commission as a decimal]

Enter .06 when prompted if the commission rate is 6%
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #9  
Old October 27th, 2008, 07:34 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Calculated field

I got a message that says Invalid column name,
I am not familiar with Excel queries. Just what did you use for column name?
--
KARL DEWEY
Build a little - Test a little


  #10  
Old October 27th, 2008, 07:51 PM posted to microsoft.public.access.queries
cesar
external usenet poster
 
Posts: 42
Default Calculated field

Karl,

The column name is actually the equation, Sales * [% of commission]
--
Cesar


"KARL DEWEY" wrote:

I got a message that says Invalid column name,

I am not familiar with Excel queries. Just what did you use for column name?
--
KARL DEWEY
Build a little - Test a little


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.