Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Need to delete character, - or * from a field.

    I've seen some of the postings but they are in the NASA space category of programing.

    Aren't there simple solutions for this?

    characters like * or - or / . . .

    Thanks . . . Rick

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    You don't say where you're trying to do this, but the general syntax, in VBA code, would be something like this, for the data entered into a Control named YourControlName:
    Private Sub YourControlName_AfterUpdate()
     Me.YourControlName = Replace(Me.YourControlName, "*", "")
     Me.YourControlName = Replace(Me.YourControlName, "-", "")
     Me.YourControlName = Replace(Me.YourControlName, "/", "")
    End Sub
    You could also use Replace() in SQL/Query, although it would be a little more complex.

    BTW, I actually took a VB6 programming class from a guy who worked his way through college doing programming for NASA's Apollo Program! According to him, Apollo 11, the first mission to land a man on the Moon, actually had less computing power on board than in found in today's average laptop!

    Linq ;0)>
    Last edited by Missinglinq; 08-10-14 at 23:35.
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts