Newbies kauaieye Posted September 13, 2002 Newbies Posted September 13, 2002 Okay, it seems simple enough, but I give up. How does one define the following fields and get them to play together nicely. The fields are: Gross price = Net * 1.15 Net price = Gross * .85 Sometimes Gross price will be entered first into the database and sometimes Net price. How do I get them to behave and not tell me I'm attempting to make a circular definition? I've fumbled long enough with the "If" function to know that I don't know enough. Can someone please help me, immediately if not sooner. :crazy:
complete-db Posted September 13, 2002 Posted September 13, 2002 Hi, you need a couple of more fields. I will try to enclose example. Hope this helps! [email protected] Cost.zip
LiveOak Posted September 13, 2002 Posted September 13, 2002 The secret is that you need four fields: GrossPriceEntry (number) NetPriceEntery (number) cGrossPrice (calculation, number) = If(notIsEmpty(GrosstPriceEntry), GrossPriceEntry, Round(NetPriceEntry*1.15, 2)) cNetPrice (calculation, number) = If(notIsEmpty(NetPriceEntry), NetPriceEntry, Round(GrossPriceEntry*0.85, 2)) On your layout in Layout Mode, using Format --> Field Format, uncheck the "allow entry" option for cGrossPrice and cNetPrice. Also in Layout Mode, format cGrossPrice and cNetPrice as opaque, stack cNetPrice on top of NetPriceEntry and stack cGrossPrice on top of GrossPriceEntry. How it works: If you click on the net price "stack" of fields you will go to the lower field (NetPriceEntry). The same thing works for the gross price "stack". This allow either entry or calculation for one of both fields. -bd
Newbies kauaieye Posted September 13, 2002 Author Newbies Posted September 13, 2002 thanks for the rapid reply. Your help is truly appreciated. For an even more elegant solution, check out the second reply to my query from LiveOak (administrator) Many thanks for taking the time to respond!
Newbies kauaieye Posted September 13, 2002 Author Newbies Posted September 13, 2002 Many thanks LiveOak. You solution is elegant in both its ease and simplicity. I really appreciate it!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now