Formula/macro for shortcut?

R

Rebecca

Hi,

I am new to Access as I usually use Excel for small scale
database stuff, so I guess my question is trivial. I need
a formula or something, so that if I type the letter "y"
in a cell the word "Yes" appears, and the same for "n" and
the word "No". Can someone tell me how to go about doing
that please?

Thanks in advance,

Rebecca
 
P

Phil

Hello,
Why to make it so difficult ?
Insert a check box with the caption "No" if Isnull or "Yes" if not Isnull.
 
R

Rebecca

Hi,

Yeah, that would be easy, but that's not what the boss
wants. Plus, I have to have the same thing for other
words, like typing 'm' will appear as 'maintenance
agreement', and 'I' will appear as 'insurance', etc
 
P

Phil

Hi,
Ok if it's the boss ...
For me, you have 2 options :
1. You can use a combobox with fields like "Yes", "No", "Maybe", ... and
when you type the 1st letter, you got it.
2. If you want to use a Textfield, you have to usea private sub OnKeyDown
with Case 89 Text = "Yes" en Case 78 Text = "No"
 
D

Damien McBain

I'd go with OnKey down.
Take a look at Access VBA help for OnKeyPress and OnKeyDown. I learned how
to do it from there so it's pretty simple :)
 
Top