|
-
Apr 20th, 2006, 02:51 PM
#1
Thread Starter
Member
Help with formatting Shorter method
Thanks to all who assisted with my previous request. Here is another one
Need to input weight and volume as 12kgs and Volume as 12ltr in database.
Need also later to do calculations with the numbers therefore need to strip out alpha characters. (do not want to input twice)
Any one with a better or shorter version as the one below that I use currently to strip invalid characters from customer name as it will take up a lot of programming lines to strip out all alpha characters from a string
'Strip out invalid characters in the Customer name...
If InStr(txtname.text, "#") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "#"), 1) = Chr$(32)
ElseIf InStr(txtname.text, "$") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "$"), 1) = Chr$(32)
ElseIf InStr(txtname.text, "%") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "%"), 1) = Chr$(32)
End If
End If
Raycomp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|