Please Bracket My Field!!!!!!

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Use the AfterUpdate event of the field....
[Fruit] = "(" & [Fruit] & ")"
hth
Al Camp
 
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
 
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
 
Back
Top