Automating Data entry

  • Thread starter Thread starter Steve Chaffin
  • Start date Start date
S

Steve Chaffin

I want to generate data based upon comparing two fields. In field one i have
a text character and in Filed two i have a different text. I want field 3 to
automatically compare fields one and two and if they are different generate a
true/false answer. Should i do this in the table or as a query and what is
the syntex for this. Ive been struggling with this for 2 days. I have tried
building an expressioin and trying to build a macro. No luck.
 
Steve said:
I want to generate data based upon comparing two fields. In field one
i have a text character and in Filed two i have a different text. I
want field 3 to automatically compare fields one and two and if they
are different generate a true/false answer. Should i do this in the
table or as a query and what is the syntex for this. Ive been
struggling with this for 2 days. I have tried building an expressioin
and trying to build a macro. No luck.

As a general rule you don't store data in a table field that can be derived
from other fields in the same record. You would just use an expression that
produces the derived result on the fly. In your case the expression...

(Field1 = Field2)

....will return True when the fields are equal and False when they are not.
In a Form or Report you would use an unbound TextBox with a ControlSource
of...

= (Field1 = Field2)

In a Query (in the designer grid)...

Field3: (Field1 = Field2)

You would not have this value in your table at all.
 
Back
Top