-
WSsolar
AskWoody LoungerOh Hans I know that but my database is very complicated and I must include all the conditions in it.Apart form that I didn
-
WSsolar
AskWoody LoungerCould you help me modify the database ? I need to make the folowing modifications:
1. The whole discounting procedure should refer only when kindid from table tkind is 13, denoted by “extra”.Therefore to each cliend a category is assigned, in my case it ia client aaa, who has tkind = extra.
2. When case is 13, the Unit price should be = office :
Case 13
Me!UnitPrice = Me!office
3. In the AFter update event of the cartons, i want to make the field Me!Unit price = Me!NewUnitPrice. In this way it will be easier to make the further calculations
I tried many times but i cannot do it. Will you help ?kind regards
Solar
-
WSsolar
AskWoody LoungerThank you Hans, for everything. I am deeply grateful.I will work on it the next days but i want to express my gratitude now.Thank you
-
WSsolar
AskWoody LoungerThank you Hans !
In the underlying query i use now the DLookup function to find the price.It is OK, i just cannot calculate the extended price.The line
Me!extendedprice = (Me!Quantity * Me!NewUnitPrice) just does not work.
My problems will be solved if I succeed somehow to obtain the extended price so as to be seen on the list box on the screen.I think it is not logical to be in the before update because Access does not know how many liters will be bought and hence cannot calculate the discount. Therefore, if I write Me!extendedprice = (Me!Quantity * Me!UnitPrice), the extended price will be obtained. Jist to make myslef clear. Unitprice is the usual, convention al price and the NewUnitPrice will be the price calculated with the percentage discount calculated as per the previous thread.Can you help ? -
WSsolar
AskWoody LoungerThank you for your reply. Sorry I cannot express myself clearly.Anyway what I want is to calculate the field
-
WSsolar
AskWoody LoungerDear Hans
i want to thank very much indeed , this is a great solution. The problems i am facing are of a quite different kind and i will send another thread for that.
-
WSsolar
AskWoody LoungerYes, i simply cut this field out since there are 10 such fields and i wanted to slim down the table in order to send it easier. The table is called Products
-
WSsolar
AskWoody LoungerDear Hans
Thank you so much for your attachement.It really works fine in the stripped down database.I have another problem.When i stipped down the database, i didnt enter a code in the BeforeUpdate event of the form which is :
Me!branch0 = Me!branch0 – Me.cartons
This codes gives rise to an error saying :The expression you entered has a field,control or property name that Microsoft Access cant find
This happened when i attached the lookup field to the query1,as the control source of the form :
NewUnitPrice: CCur(Nz(DLookUp(“NewUnitPrice”;”qryAmount”;”OrderID=” & [Orders].[OrderID]);0))Could i look up the field from the form itself or it is the same ?
-
WSsolar
AskWoody LoungerDear Hans
i am trying to implement the wonderful solution into my database. The subform of my dataabse is caled FOrder details extended.its record source is Query1. To this Query1 i tried to add on the query QueryAmount and to add its field NewUnitprice into the Query1.However i get the message “you cant go tothe specified record”.How can i avoid this problem ?
-
WSsolar
AskWoody LoungerI made a quick check and found out that it is exactly spot on,exactly what i want. i cannot stop wondering how a formidable task can be solved is such a way.It is awsome, this solutiion..Thank so much indeed showing to all how powerful Access is
-
WSsolar
AskWoody LoungerThank you for you very interesting reply. I could use this powerful query and would like to ask you the following. How can I see the discounts received for each order, since the query gives only the total discount ? For example for the client aa I have :
CompanyName M TotalLiters Discount reseller unitprice orderid
aaa 2007 05 205 5,00% 30,00 -
WSsolar
AskWoody LoungerThank you !
-
WSsolar
AskWoody Loungeryes,of course ! it shoulld be currency ! Thank you !
-
WSsolar
AskWoody LoungerThank you Groveli !
-
WSsolar
AskWoody LoungerThank you, the code gives now the correct figures
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Blocking Search (on task bar) from going to web
by
HenryW
2 hours, 40 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
7 hours, 47 minutes ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
7 hours, 54 minutes ago -
regarding april update and may update
by
heybengbeng
9 hours, 23 minutes ago -
MS Passkey
by
pmruzicka
5 hours, 27 minutes ago -
Can’t make Opera my default browser
by
bmeacham
17 hours, 3 minutes ago -
*Some settings are managed by your organization
by
rlowe44
3 hours, 47 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
15 hours, 58 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 11 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 20 hours ago -
AI slop
by
Susan Bradley
10 hours, 45 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 21 hours ago -
Two blank icons
by
CR2
9 hours, 40 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
2 days, 6 hours ago -
End of 10
by
Alex5723
2 days, 9 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
1 day, 7 hours ago -
test post
by
gtd12345
2 days, 15 hours ago -
Privacy and the Real ID
by
Susan Bradley
2 days, 5 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
8 hours ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 19 hours ago -
Upgrading from Win 10
by
WSjcgc50
1 day, 7 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 11 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 11 hours ago -
The story of Windows Longhorn
by
Cybertooth
2 days, 23 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 13 hours ago -
Are manuals extinct?
by
Susan Bradley
13 hours, 52 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 days, 22 hours ago -
Network Issue
by
Casey H
3 days, 9 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 10 hours ago -
May 2025 Office non-Security updates
by
PKCano
4 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.