Text Box with single Letter only

J

Jim

I have a text box on a form where I need to have only one letter F, J, or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 
K

Ken Snell

Set a validation rule that will allow only one letter and only one of these
letters:

Like "[fji]"
 
R

Rick

If it were me, I would make it a combo box.

In the ROW SOURCE TYPE I would enter "Value List"
In the ROW SOURCE I would enter "F;J;I"
I would set the LIMIT TO LIST to "Yes"

Hope that helps.


I have a text box on a form where I need to have only one letter F, J, or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 
J

Joan Wild

Jim said:
I have a text box on a form where I need to have only one letter F,
J, or I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?

You could set a validation rule for the textbox, or create a combobox using
a value list as the row source, and set Limit To List to true.
 
J

Jim

Hi Rick
Looks a good idea, however, I can't seem to make it work
correctly. It says not validated!
Any ideas
Jim
 
J

Jim

Hi Ken
Entered that in the val rule but doesn't like it.
Does it need something else?
Jim

Ken Snell said:
Set a validation rule that will allow only one letter and only one of these
letters:

Like "[fji]"


--
Ken Snell
<MS ACCESS MVP>

Jim said:
I have a text box on a form where I need to have only one letter F, J, or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 
K

Ken Snell

"Doesn't like it" means what -- you get an error message? and if yes, what
does it say? Did you enter it in the properties for the control on the form?
Or somewhere else?

--
Ken Snell
<MS ACCESS MVP>

Jim said:
Hi Ken
Entered that in the val rule but doesn't like it.
Does it need something else?
Jim

Ken Snell said:
Set a validation rule that will allow only one letter and only one of these
letters:

Like "[fji]"


--
Ken Snell
<MS ACCESS MVP>

Jim said:
I have a text box on a form where I need to have only one letter F,
J,
or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 
J

Joan Wild

Jim said:
Hi Rick
Looks a good idea, however, I can't seem to make it work
correctly. It says not validated!
Any ideas
Jim

Jim, the Row Source should be "F";"J";"I"
 
J

Jim

Hi Ken
I took the long way round and created a table with F J and I
in the rows and attached it to a combo box, which works fine.
Not so efficient though I suspect.
I see that Joans solution works well on my backup file.
Many thanks for your help
Jim

Ken Snell said:
"Doesn't like it" means what -- you get an error message? and if yes, what
does it say? Did you enter it in the properties for the control on the form?
Or somewhere else?

--
Ken Snell
<MS ACCESS MVP>

Jim said:
Hi Ken
Entered that in the val rule but doesn't like it.
Does it need something else?
Jim

Ken Snell said:
Set a validation rule that will allow only one letter and only one of these
letters:

Like "[fji]"


--
Ken Snell
<MS ACCESS MVP>

I have a text box on a form where I need to have only one letter F, J,
or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 
K

Ken Snell

OK - just to let you know, the solution that I posted worked fine in my
ACCESS 2002 setup as the validation rule for a control on a form.


--
Ken Snell
<MS ACCESS MVP>

Jim said:
Hi Ken
I took the long way round and created a table with F J and I
in the rows and attached it to a combo box, which works fine.
Not so efficient though I suspect.
I see that Joans solution works well on my backup file.
Many thanks for your help
Jim

Ken Snell said:
"Doesn't like it" means what -- you get an error message? and if yes, what
does it say? Did you enter it in the properties for the control on the form?
Or somewhere else?

--
Ken Snell
<MS ACCESS MVP>

Jim said:
Hi Ken
Entered that in the val rule but doesn't like it.
Does it need something else?
Jim

Set a validation rule that will allow only one letter and only one of
these
letters:

Like "[fji]"


--
Ken Snell
<MS ACCESS MVP>

I have a text box on a form where I need to have only one letter
F,
J,
or
I
(in capitals) entered and I want no other letter or letters inserted.
How do I format for that condition?
Thanks
Jim
 

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