multiplying multiple Fields in a form

Dacho

New member
Local time
Today, 11:08
Joined
Dec 5, 2008
Messages
3
I have 4 fields with data that i want to multiply to get a volume in the capacity field

Length Width Depth (3): I know that if i multiply the three in the control source for capacity i can get the volume

and

Depth and Diameter (2): I know if i multiply these two in the control source for capacity i can get the volume.

I don't want to have two capacity fields in the table i am populating using the form.

Can somebody please help me with an if then statement or method that will multiply only the length x width x depth to calculate a volume (and only multiply these values diameter is empty)

conversely

if only depth and diameter are entered (length and width are empty) these values multiply together to give a volume.

Mainly want to stay away from having two capacity fields

Thanks in advance

If there is a way to do this in the tables that would be even better. using multiple columns to populate an empty column.
 
depth times diameter isnt volume

depth times pi radius squared is volume (of a cylinder)
 
Why not use a Combo box to change the code like
if me.cboCalculation = LWD then
'calculate Length width depth'
else
'calculate Depth Diameter'
end if
 

Users who are viewing this thread

Back
Top Bottom