Re: Uppercase to Mixed Case Edit in Field

Giganews Newsgroups
Subject: Re: Uppercase to Mixed Case Edit in Field
Posted by:  Fred Zuckerman (Zuckerma…@sbcglobal.net)
Date: Wed, 09 Aug 2006

"sara" <saraqpo…@yahoo.com> wrote in message
news:1155064850.615780.2544…@b28g2000cwb.googlegroups.com...
> I have a table where a few of the users entered vendor names ALL IN
> UPPER CASE.  I have created forms to edit the data, but I can't seem to
> allow changing JOE SMITH to Joe Smith.
>
> What to I have to do to have the user change the name, but keep the
> key?  Overall, I think any "edits" simply add a new record, rather than
> change the existing record.
>
> The form is simple - Choose the vendor from the drop-down list.
> After Update, a new field displays:  Vendor:  [and the chosen vendor in
> the field]
>
> If the user wishes to Add a new vendor or Delete the current one, they
> choose a button on the bottom of the screen and that works just fine.
>
> The "edit" or "Change" is what doesn't work.
>
> Don't know what code to post, so I didn't post any.
>
> Thanks.
>
> Sara

If the control on the form is bound and unlocked, then the users should be
able to change it. But I suspect that you have it locked so nobody
accidently changes it. Am I correct?
If so, then unlock the control and put the following code in the
BeforeUpdate Event:

'''(CAUTION - air code)
' If the user only changes the case of the characters then old & new values
will match
If Me.VendorName <> Me.VendorName.OldValue Then
  Msgbox "You attempted to change the vendor name"
  Cancel = True
  Me.Undo
  Exit Sub
Endif

Good Luck,
Fred Zuckerman

Replies

In response to

Uppercase to Mixed Case Edit in Field posted by sara on 8 Aug 2006