473,725 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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. (tblPartPerClai m &
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.ch kCaseExtended = -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 1912
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. (tblPartPerClai m &
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.ch kCaseExtended = -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
24856
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 contains the subform is named Clients. I have this code in the Add Client btn: If Forms!Clients.subformVisits!VisitDirty = True Then MsgBox "Visit subform is dirty!"
6
1584
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 VBA? Thank you very much
0
395
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 underlying the subform." ....................hmmmmmmmmm................... I put in a field in the underlying table with a default value of 1. I created a text box which adds up the values in the new field
0
1250
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. The Part Total field is calculated as (=.*.). Then there is a hidden text box on my subform that calculates the sum of all the Part Totals for each claim. There is another field on my main form set equal to this field on the subform. My...
6
8234
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 of a snapshot of my table design and i wud highly appreciate if anyone cud help me on building the table relationships. Link: http://www.geocities.com/raji_mll/Relationships.JPG The CaseID is the main primary key that links all my tables and we...
2
4292
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: Me!subForm.Form!txtTextBox and for some reason, in certain contexts, we get the error: Error 2455: You entered an expression that has an invalid reference
1
11449
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 Patient table. When I enter any word in the name text box and click enter then the values in sub form only display the details of the patient whose first name or last name matches with the given name. When button Clear is hit ( in future I am planning...
3
8794
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 the work is completed, along with a date text box to indicate when the work was completed. There is also a check box and corresponding date field in the main form to indicate when the entire request is completed. I'm trying to create an event...
4
7834
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 always get the following dialog: "Save changes to the following objects?" I tried putting a saverecord command prior to the close, but that had no affect. I have found a work around, but maybe I am making this too
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.