IIF function based on Check box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a contact details form with the next of kin contact details included.
I have a check box with the next of kin details called "Same As Above". I am
trying to create an iif statement which will be based on the chekc box. so,
if the check box is ticked, then each field of the next of kin contact
details will be automatically filled in with the same details as the employee
contact details.

This is what i have tried but it wont work:

IIf([Same As Above]="Yes",[Address 1],"")

I want the 'iif false' part to be blank, so that i can then manually type in
the different details. How can i make this work and where exactly should i do
this. i do not know VBA. my fields are

TMain (table):
Address 1
Address 2
Address 3
Town/City
Postal Code
Country

TNextofKin (table):
KAddress 1
KAddress 2
KAddress 3
KTown/City
KPostal Code
KCountry

Kind Regards

Rigby
 
Everyone

I am really sorry for wasting anyone's time. I have just spotted my silly
error. I needed to use 'True' instead of "Yes" for my checkbox. It works fine
now. Thank you anyway.

Kind Regards

Rigby
 
Rigby,
Have you considered not filling in the second address field(s) if this box
is checked True? You already have the data in the database and can grab it
if needed based on the checkbox value.
 
Back
Top