Automating Data entry

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.
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top