
Remove Spaces using AfterUpdate?
Thanks for everyone's help. I would not have found the solution
without your help. This is the code that made it work:
Private Sub Control1_AfterUpdate()
Dim text1 As String
text1 = Me!Contro1
Me!Control1 = Replace([text1], " ", "")
End Sub
Quote:
> hi
> use this:
> Private Sub Text1_AfterUpdate()
> Text2 = Replace(Text1, " ", "")
> End Sub
> this will replace all spaces in text1 with zero lengths,
> giving you the result you wanted. (i hope)
> Erez.
> >-----Original Message-----
> >I hope someone can help...
> >I want to try to delete blank spaces from a record in
> Access 2000. I
> >wanted to try to do it during the data-entry. So I want
> to use the
> >AfterUpdate function to delete the blanks. For example:
> >in Form1 someone types "abc def" into Contro1.
> >I would like to use AfterUpdate to change it to "abcdef"
> >Private Sub Control1_AfterUpdate()
> > new.value = Old.value without " "
> >End Sub
> >I don't know if this is possible. I'm rather new at
> this. Any help
> >would be greatly appreciated.
> >.