T
TL
I have written the following If then else statement for a form. It makes
sure that 3 fields in a form add up to a seperate field before I go onto
another procedure. No matter what I do, it keeps skipping over this
statement. I can make sure that the fields add up to [Form].[Text41] one
time and not add up to it another and it still skips it.
Is there a better way of doing this??
If [Form].[Food Cost.SumofTrnValue] + [Form].[Pack Cost.SumofTrnValue] +
[Form].[Labor Costs.TrnValue] + [Form].[Freezing Costs.TrnValue] +
[Form].[Overhead Costs.TrnValue] <> [Form].[Text41] Then
MsgBox "The sum of Food Cost, Pack Cost, Labor Cost, Freezing Cost and
Overhead Cost does not add up to the Total Dollars Field", 0, "Addition
Error"
Cancel = True
frm("Text41").SetFocus
End
End If
Thanks!!
Tim
sure that 3 fields in a form add up to a seperate field before I go onto
another procedure. No matter what I do, it keeps skipping over this
statement. I can make sure that the fields add up to [Form].[Text41] one
time and not add up to it another and it still skips it.
Is there a better way of doing this??
If [Form].[Food Cost.SumofTrnValue] + [Form].[Pack Cost.SumofTrnValue] +
[Form].[Labor Costs.TrnValue] + [Form].[Freezing Costs.TrnValue] +
[Form].[Overhead Costs.TrnValue] <> [Form].[Text41] Then
MsgBox "The sum of Food Cost, Pack Cost, Labor Cost, Freezing Cost and
Overhead Cost does not add up to the Total Dollars Field", 0, "Addition
Error"
Cancel = True
frm("Text41").SetFocus
End
End If
Thanks!!
Tim