How to design the forms with these criteria?

  • Thread starter Thread starter smith
  • Start date Start date
S

smith

1. If the data in Field A and Field B are all negative numbers, the value in
Field C returns to "Yes".

2. If the data in Field A >Field B, data in Field D is Field A. If the data
in Field B>Field A, data in Field D is Field B.
 
The control source for FieldC would be something like:

=DCount("*", "TableName", "FieldA > 0 OR FieldB > 0") = 0

(complete with the equal sign)

The control source for FieldD would be something like:

=IIf(Me.FieldA >= Me.FieldB, Me.FieldA, Me.FieldB)

I'm assuming that you want FIeldD to be the same as FieldA if FieldA and
FieldB are the same. If you wanted something else, you'd use something like:

=IIf(Me.FieldA > Me.FieldB, Me.FieldA, IIf(Me.FieldA < Me.FieldB,
Me.FieldB, "Equal"))

(watch for word-wrap: that should be all one line)
 
Back
Top