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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Please Help - Need to finish this project



 
 
Thread Tools Display Modes
  #1  
Old April 7th, 2008, 12:59 AM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

I have a Form and a subform, on the Main form you would enter the Cost of a
Plan, along with the way that the plan was purchased. So I would have Cost of
Plan - EPlan Charge - Trip Charge - Auth Charge. I have a total revenue field
which I would like for the totals to be entered automatically. Now on the
subform the cost of plans along with the Eplan charge, trip charge, auth
charge would already be showing once the info is entered into the Main form.
I can't seem to figure out how to total these items on the Main Form again it
would be:
Cost Of Plans - EPlan Charge - Trip Charge - Auth Charge = Total Revenue.
Cost of Plans - Web Charge - Trip Charge - Auth Charge = Total Revenue
The other is just Direct Bill.

Does anyone have any suggestions, or is there another way of doing this?
Any help is very much appreicated. All the field are all seperated. I'm
thnking maybe I need to have them in a combo box as these are all purchase
methods, except Cost of Plans

Thanks


  #2  
Old April 7th, 2008, 01:36 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Please Help - Need to finish this project

There are 2 basic ways to handle this:

1. You can create a column in a query which does the math.
2. You can create an unbound textbox on the form which has a controlsource
of:

= [Cost Of Plans] - [EPlan Charge] - [Trip Charge] - [Auth Charge]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"teelee" wrote in message
...
I have a Form and a subform, on the Main form you would enter the Cost of a
Plan, along with the way that the plan was purchased. So I would have Cost
of
Plan - EPlan Charge - Trip Charge - Auth Charge. I have a total revenue
field
which I would like for the totals to be entered automatically. Now on the
subform the cost of plans along with the Eplan charge, trip charge, auth
charge would already be showing once the info is entered into the Main
form.
I can't seem to figure out how to total these items on the Main Form again
it
would be:
Cost Of Plans - EPlan Charge - Trip Charge - Auth Charge = Total Revenue.
Cost of Plans - Web Charge - Trip Charge - Auth Charge = Total Revenue
The other is just Direct Bill.

Does anyone have any suggestions, or is there another way of doing this?
Any help is very much appreicated. All the field are all seperated. I'm
thnking maybe I need to have them in a combo box as these are all purchase
methods, except Cost of Plans

Thanks




  #3  
Old April 8th, 2008, 12:41 AM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value or
identifier.

Thanks

"Arvin Meyer [MVP]" wrote:

There are 2 basic ways to handle this:

1. You can create a column in a query which does the math.
2. You can create an unbound textbox on the form which has a controlsource
of:

= [Cost Of Plans] - [EPlan Charge] - [Trip Charge] - [Auth Charge]
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"teelee" wrote in message
...
I have a Form and a subform, on the Main form you would enter the Cost of a
Plan, along with the way that the plan was purchased. So I would have Cost
of
Plan - EPlan Charge - Trip Charge - Auth Charge. I have a total revenue
field
which I would like for the totals to be entered automatically. Now on the
subform the cost of plans along with the Eplan charge, trip charge, auth
charge would already be showing once the info is entered into the Main
form.
I can't seem to figure out how to total these items on the Main Form again
it
would be:
Cost Of Plans - EPlan Charge - Trip Charge - Auth Charge = Total Revenue.
Cost of Plans - Web Charge - Trip Charge - Auth Charge = Total Revenue
The other is just Direct Bill.

Does anyone have any suggestions, or is there another way of doing this?
Any help is very much appreicated. All the field are all seperated. I'm
thnking maybe I need to have them in a combo box as these are all purchase
methods, except Cost of Plans

Thanks





  #4  
Old April 8th, 2008, 01:03 AM posted to microsoft.public.access.forms
Clif McIrvin
external usenet poster
 
Posts: 40
Default Please Help - Need to finish this project

On Apr 7, 6:41*pm, teelee wrote:
Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value or
identifier.

Thanks


From memory, IIF requires 3 parts, and your expression shows only 2.
You *must*
provide an expression for the FALSE case.

--
Clif

Fellow Access learner
  #5  
Old April 8th, 2008, 01:28 AM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

Not really sure what that means, can you help me out a little bit more?

Thanks

"Clif McIrvin" wrote:

On Apr 7, 6:41 pm, teelee wrote:
Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value or
identifier.

Thanks


From memory, IIF requires 3 parts, and your expression shows only 2.
You *must*
provide an expression for the FALSE case.

--
Clif

Fellow Access learner

  #6  
Old April 8th, 2008, 01:34 AM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

On my form the person would enter the Cost of Plan along with the EPlan
Charge if purchased in that way, or Web Site, again if purchased in that way.
Would also enter the Trip Charge and the Auth Charge. What I'm trying to do
for the Total field is have this calculated after this info above is entered,
in other words if the Plan was purchased by Website then it would be Cost of
Plan ($2500.00)-WebSite Charge $1500.00) - Trip Charge - Auth Charge = Total
Revenue. I'm thinking this is the way to do this. Any other suggestions would
be very much appreciated as I'm trying real hard to finish this project.

Thanks

"Clif McIrvin" wrote:

On Apr 7, 6:41 pm, teelee wrote:
Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value or
identifier.

Thanks


From memory, IIF requires 3 parts, and your expression shows only 2.
You *must*
provide an expression for the FALSE case.

--
Clif

Fellow Access learner

  #7  
Old April 8th, 2008, 01:22 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Please Help - Need to finish this project

Immediate If (IIf) requires an evaluation of the expression like:

IIf(Expression, True Part, False Part)

your code reads:

IIf(Expression, True Part)

In other words, what happens if the expression:

SoldWeb='N'

does not evaluate to 'N'?

You need something like:

TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth),0)
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"teelee" wrote in message
...
Not really sure what that means, can you help me out a little bit more?

Thanks

"Clif McIrvin" wrote:

On Apr 7, 6:41 pm, teelee wrote:
Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value
or
identifier.

Thanks


From memory, IIF requires 3 parts, and your expression shows only 2.
You *must*
provide an expression for the FALSE case.

--
Clif

Fellow Access learner



  #8  
Old April 8th, 2008, 10:31 PM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

I entered your expression and now I'm getting this error message: The
Expressions you entered contains invalid syntax. You may have entered an
operand without an operator. Any suggestions?
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth),0)

Thanks

"Arvin Meyer [MVP]" wrote:

Immediate If (IIf) requires an evaluation of the expression like:

IIf(Expression, True Part, False Part)

your code reads:

IIf(Expression, True Part)

In other words, what happens if the expression:

SoldWeb='N'

does not evaluate to 'N'?

You need something like:

TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth),0)
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"teelee" wrote in message
...
Not really sure what that means, can you help me out a little bit more?

Thanks

"Clif McIrvin" wrote:

On Apr 7, 6:41 pm, teelee wrote:
Ok this is the expression I entered in the query:
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth))
now I'm getting this error message: The expression you entered contains
invalid syntax you may have entered a comma without a proceding value
or
identifier.

Thanks


From memory, IIF requires 3 parts, and your expression shows only 2.
You *must*
provide an expression for the FALSE case.

--
Clif

Fellow Access learner




  #9  
Old April 8th, 2008, 11:28 PM posted to microsoft.public.access.forms
Clif McIrvin
external usenet poster
 
Posts: 40
Default Please Help - Need to finish this project

On Apr 8, 4:31*pm, teelee wrote:
I entered your expression and now I'm getting this error message: The
Expressions you entered contains invalid syntax. You may have entered an
operand without an operator. Any suggestions? *
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth),0)

Thanks


Without having your exact field names it's difficult to answer a
syntax error.

Assuming that all of the fieldnames you are referencing are controls
on your form, it looks like Access might be looking at

[TPM]WebCharge

and seeing two different objects: [TPM] and WebCharge. Without an
operator ( + - * ) or whatever, it doesn't know what to do.

On the other hand, if these fields involve both the form and the
subform you will need to tell Access where to find them.

Good luck.

--
Clif
  #10  
Old April 8th, 2008, 11:55 PM posted to microsoft.public.access.forms
teelee
external usenet poster
 
Posts: 114
Default Please Help - Need to finish this project

On my Form I have all controls as Currancy The Field names I have are Cost of
Plan, Web Site Charge, EPlan Charge, TPM Charge, AuthNetCharge. These field
names are all the same names on my subform. Can you explain more about the
operator? I would enter the Cost of Plans,Eplan Charge,TPMCharge,
AuthNetCharge and would like them to total in the Total Revenue. It would go
this way: Cost of Plans minus EPlanCharge minus the TPMCharge minus the
AuthNetCharge = Total Revenue. Same would go if the Plan was purchased by
WebSite. Any suggestions on this is very much appreciated.

Thanks

"Clif McIrvin" wrote:

On Apr 8, 4:31 pm, teelee wrote:
I entered your expression and now I'm getting this error message: The
Expressions you entered contains invalid syntax. You may have entered an
operand without an operator. Any suggestions?
TotalRevenue:IIF(SoldWeb='N',([Cost]-[Eplan]-[TPM]WebCharge-TPM-Auth),0)

Thanks


Without having your exact field names it's difficult to answer a
syntax error.

Assuming that all of the fieldnames you are referencing are controls
on your form, it looks like Access might be looking at

[TPM]WebCharge

and seeing two different objects: [TPM] and WebCharge. Without an
operator ( + - * ) or whatever, it doesn't know what to do.

On the other hand, if these fields involve both the form and the
subform you will need to tell Access where to find them.

Good luck.

--
Clif

 




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 12:13 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.