Please Bracket My Field!!!!!!

G

Guest

I got a field namely "Fruit" in a form

when i type "banana", i want the word banana automatically change to
"(banana)"

In short i want the value automatically bracketed for any value typed

Any solutions?

Thanks in advance

Kennykee
 
A

Al Camp

Use the AfterUpdate event of the field....
[Fruit] = "(" & [Fruit] & ")"
hth
Al Camp
 
G

Guest

Hi, Kennykee.

While it is certainly possible to change it with the AfterUpdate event, why
bother? Simply add the brackets in a query, or in a form or report control
whenever you need them.

Sprinks
 
C

Christopher Glaeser

While it is certainly possible to change it with the AfterUpdate event,
why
bother?

I don't know if this is a good reason, but I decided to parse my phone
numbers in AfterUpdate, delete the punctuation, and then and add the parens
and dash as needed so that copy/paste to/from other applications would work.
In my first implementation, I limited the phone numbers to digits and used
formatting to insert the parens and dash, and this limited the ability to
copy/paste with other applications. Basically, I try and accept the phone
number in virtually any format, and then convert it to a standard form. I'm
new to Access and there may be a better way to do it, but that's why I added
the parens in AfterUpdate and store them with the phone number.

Best,
Christopher
 

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