Calculation for a form field OR direct entry ? (1 Viewer)

dcavaiani

Registered User.
Local time
Today, 08:58
Joined
May 26, 2014
Messages
385
I have a "added-up" form "total" field which is based on a bunch of prior entries. Is there a way to "IF" those prior fields are filled in, then use the formula for this "total" field, ELSE the User may just key in a "total" directly into the "total" field, essentially bypassing all of the other prior optional fields. Actually none of these fields is mandatory and may all be left blank.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:58
Joined
Oct 29, 2018
Messages
21,447
Hi. If you’re using an unbound control with a calculated value, the user won’t be able to edit it. So, one way to allow edit is don’t use a calculated value, but simply enter the calculated value into it. You can do this using a button to do the calculations and then assign the result to the box. If the user wants to adjust it, they can. However, what is the purpose of the Total box? Are you saving this value into the table?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:58
Joined
Feb 19, 2013
Messages
16,601
You can do this using a button to do the calculations and then assign the result to the box.
or you could put that code behind the double click event for the total control
 

dcavaiani

Registered User.
Local time
Today, 08:58
Joined
May 26, 2014
Messages
385
The "total" field is bound to the table. I am kind of "backing down" on the system requirements cause the user will not often be willing to enter all of the construction job "AMOUNT" details, e.g., the hours, rates, O/H %'s, Sub-Contractors, etc.

They would be willing to simply enter JUST the total job Estimate into the "total" field. In rare instances, they may enter ALL of the fields, then the vba code will calculate the "total"
 

dcavaiani

Registered User.
Local time
Today, 08:58
Joined
May 26, 2014
Messages
385
I added a 2nd "total" field unbounded, and IF filled in then moved that amount to the the Table field - as an override.
 

Users who are viewing this thread

Top Bottom