Form Code

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

I have a form that allows a person to enter certain
information to be stored in the table. In one field in
the form, they want to be sure the person enters either a
Y or N, but cannot enter anything else.
I used an IF statement in the code, but did not work. Is
there simple code that i can use to accomplish this?

Thanks,
Shirley
 
You can either use validation rules for the control, change the field to a
Yes/No field, or use a checkbox on the form and store a "Y" in the table if
the checkbox is "checked" and a "N" if it's not.
 
Why not just make the field a Yes/No field in the table? No need to
reinvent the wheel when there is already a data type out there to do this.
Personally, I make most of my yes/no fields checkboxes on my forms. I have
(a few times) used combo-boxes (drop-downs) if they seemed more appropriate.



Rick B
 
Back
Top