I have an MS Access app I'm converting to Caspio that has some simple VB code in the AfterUpdate of a form's controls, that changes the values in other controls based on user input.
For example, there are 3 fields/controls:
Cost (currency), default value 0
Markup (percentage integer), default value .5 (50%)
Price (currency), default value 0
In Cost AfterUpdate the code is: Me.Price= ([Cost]*[Markup])+[Cost] so if the user entered 100 for cost it would set the Price value at 150
In Markup AfterUpdate the code is the same: Me.Price= ([Cost]*[Markup])+[Cost] so if Cost = 100 and the user changed the Markup value to .3 (30%) then the Price = 130. (If Cost = 0 or null the code needs to run with a msg 'you cannot markup a 0 value).
In Price AfterUpdate the code is Me!MarkUp = ([Price] / [Cost]) - 1 so if Cost = 100 and a Price value of 130 is entered it updates Markup to .3 (30%).
These 3 fields need to be saved in the table and not be calculated fields because the user needs to be able to enter any combination randomly and have it calculate the values for the other fields.
I have no idea how to do this in Caspio- any help would be greatly appreciated.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
DesiLogi
I have an MS Access app I'm converting to Caspio that has some simple VB code in the AfterUpdate of a form's controls, that changes the values in other controls based on user input.
For example, there are 3 fields/controls:
Cost (currency), default value 0
Markup (percentage integer), default value .5 (50%)
Price (currency), default value 0
In Cost AfterUpdate the code is: Me.Price= ([Cost]*[Markup])+[Cost] so if the user entered 100 for cost it would set the Price value at 150
In Markup AfterUpdate the code is the same: Me.Price= ([Cost]*[Markup])+[Cost] so if Cost = 100 and the user changed the Markup value to .3 (30%) then the Price = 130. (If Cost = 0 or null the code needs to run with a msg 'you cannot markup a 0 value).
In Price AfterUpdate the code is Me!MarkUp = ([Price] / [Cost]) - 1 so if Cost = 100 and a Price value of 130 is entered it updates Markup to .3 (30%).
These 3 fields need to be saved in the table and not be calculated fields because the user needs to be able to enter any combination randomly and have it calculate the values for the other fields.
I have no idea how to do this in Caspio- any help would be greatly appreciated.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.