×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Removing character when scanning

Removing character when scanning

Removing character when scanning

(OP)
We have a symbol omnilink scanner and I want to replace the first character from a barcode with a different character when I scan it. Example: I scan a barcode "babc1234" and I want the result to be "#abc1234" The first character will always be "b" and the replacement character will always be "#" Is there any way to do this?

Thanks,
Michael

RE: Removing character when scanning

I would think it would be a trivial transformation for your underlying application.

Jim Asman
jlasman@telus.net

RE: Removing character when scanning

If you have the manual for the scanner
It should have and programming page in it to append a character(s) or prefix to the data just scanned.

DougP, MCP, A+

RE: Removing character when scanning

It appears you want to substitute a character. This can be done as well.

DougP, MCP, A+

RE: Removing character when scanning

memcom,
As jlasman said, simple transform.
Why not put a textbox on the forms and reports that use the [barcode] field and add as the controlsource;
="#" & mid([barcode],2,12]
(twelve is arbitrary. Use a number that is >= to the longest scan.) That way you always have the original scan.
jim

RE: Removing character when scanning

(OP)
I am scanning into a program that I do not have access to changing. It is a small program and I only have the exe file.

RE: Removing character when scanning

(OP)
Yes that is what I have. I just found the programming manual and I will try it in just a little while.

RE: Removing character when scanning

memcom,
So what did you find out?

DougP, MCP, A+

RE: Removing character when scanning

(OP)
I was able to program the scanner so that after the scan was made, it sent the home key, the delete key, the character I wanted to add, the end key and then enter. It seems to have worked great.

RE: Removing character when scanning

Fantastic !!!!

DougP, MCP, A+

RE: Removing character when scanning

Hi memcom,

I hope this code can help you.
Dim strReplace as string
Dim strChange as string


strReplace = UCase(Microsoft.VisualBasic.Left(txtbox.Text, 1))

'If first string in textbox = 'a', then replace 'a' by '#'
if strReplace = "a" then
   strChange = textbox.text
   strChange  = Replace(strChange , strReplace , "#")
End if

Hope this help you.

RE: Removing character when scanning

textbox.text = "#" & mid(textbox.text,2,len(textbox.text))

===================================
Never underestimate the power of stupid people in big numbers
===================================

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close