473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

check box changes subform operation

I have a simple invoice form with a subform that allows the user to list part
numbers along with the quantity. The subform has a calculated field called
[PartTotal] that should take either the[LIST PRICE] or the [NET PRICE] and
multiply by [Quantity] to get a value.

The subform is based on a query that pulls from 2 tables. (tblPartPerClaim &
tblParts)

I've tried using the IIF function in the [PartTotal] field of the query, the
[PartTotal] field of the subform, and I've also tried leaving the text box on
the form view of the subform unbound and using code in the after update event
of the checkbox on the main form. The only time I got anywhere close was
when I used...

Part Total: CCur(Quantity*(IIf(frmClaim.chkCaseExtended = -1,[LIST PRICE],
[NET PRICE])))

....as another field in the query.

I have some information in a previous post with a similar subject line.

Thanks for everyone's help,

Shannan
--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
2 1892
Oh, sorry I forgot to say what that did. It asked for a parameter value when
ran the query. If I entered "-1" then it would appropriately use the[LIST
PRICE], otherwise it would use the [NET PRICE]. However, this had absolutely
no effect on the main form except [PartTotal] was completely blank.

Shannan

Shannan Casteel wrote:
I have a simple invoice form with a subform that allows the user to list part
numbers along with the quantity. The subform has a calculated field called
[PartTotal] that should take either the[LIST PRICE] or the [NET PRICE] and
multiply by [Quantity] to get a value.

The subform is based on a query that pulls from 2 tables. (tblPartPerClaim &
tblParts)

I've tried using the IIF function in the [PartTotal] field of the query, the
[PartTotal] field of the subform, and I've also tried leaving the text box on
the form view of the subform unbound and using code in the after update event
of the checkbox on the main form. The only time I got anywhere close was
when I used...

Part Total: CCur(Quantity*(IIf(frmClaim.chkCaseExtended = -1,[LIST PRICE],
[NET PRICE])))

...as another field in the query.

I have some information in a previous post with a similar subject line.

Thanks for everyone's help,

Shannan

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #2
Nevermind, I figured out another way to do it. I just displayed both values
list and net. Then I made the checkbox control the formula for another total
field on my main form.

Shannan

Shannan Casteel wrote:
Oh, sorry I forgot to say what that did. It asked for a parameter value when
ran the query. If I entered "-1" then it would appropriately use the[LIST
PRICE], otherwise it would use the [NET PRICE]. However, this had absolutely
no effect on the main form except [PartTotal] was completely blank.

Shannan
I have a simple invoice form with a subform that allows the user to list part
numbers along with the quantity. The subform has a calculated field called

[quoted text clipped - 20 lines]

Shannan

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
6
by: Paul T. RONG | last post by:
Dear all, The OrderDetail subform has following fields: OrderDetailID OrderID ProdID Quantity Price how to get the OrderDetailID of a record I sellected in Orderdetail subform using...
0
by: Karl Roes | last post by:
I'm still having trouble posting follow-ups. :-( "Unable to retrieve message 7cc66112.0501041919.3a6628b4@posting.google.com" Now Turtle wrote "You'll need an extra field in the table...
0
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform for listing parts. It has fields including: ClaimID, ITEM, NET PRICE, LIST PRICE, Quantity, Supplier, and a calculated field called Part Total. The subform is based on a query. ...
6
by: Raji16 | last post by:
Hi, I am a new member. i am designing a simple judicial database system. however after creating tables i am a bit confused on setting the relationships between tables :confused: here is the link...
2
by: David W. Fenton | last post by:
I think at various times we've all encountered this problem: A subform is on a main form. From the code of the main form we refer to some property of/control on the child form thus: ...
1
by: pdesh3 | last post by:
I have created a form where one text box and two command buttons named Search and Clear are present. Under all these fields I am also including a subform which displays all the values stored in...
3
by: jsurkin | last post by:
I have a form that lists a single work request, with an attached continuous subform that lists specific items that are part of the request. Each item in the subform has a check box to indicate when...
4
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.