Barcode Identifier

M

Majic

Hello everyone,
Your assistance on this will be appreciated

I created a simple form in access to scan barcode item information.
For example, there is a label is barcoded using an identifier such as
Purchase order with identifier "1K" in front of the number ex.
1K123454 and barcode item startswith "P" for example
"P00-104445-000A". I would like it when I scan Item for example to go
to item text box automatically by regcognizing "P" as item.
I know it can be done and I tried the following and it does not work:

If mytextbox.text.toupper.startwith ("1K") then
mytextbox.text = mytextbox.text.replace("1K","")
end if

I know this is in VB.net and toupper and startwith in access does not
work

any suggestion, please

Thank you

majic
 
T

Tom van Stiphout

On Sat, 29 Aug 2009 07:56:23 -0700 (PDT), Majic <[email protected]>
wrote:

The equivalent expression would be:
if left(ucase(mytextbox.text),2) = "1K" then
mytextbox.text = Mid(mytextbox.text,3)
end if

Note that the text property is only available if the textbox has
focus. Otherwise use the value property.

-Tom.
Microsoft Access MVP
 
M

Majic

The equivalent expression would be:
if left(ucase(mytextbox.text),2) = "1K" then
  mytextbox.text = Mid(mytextbox.text,3)
end if

Note that the text property is only available if the textbox has
focus. Otherwise use the value property.

-Tom.
Microsoft Access MVP










- Show quoted text -

Thank you so much
 
M

Majic

The equivalent expression would be:
if left(ucase(mytextbox.text),2) = "1K" then
  mytextbox.text = Mid(mytextbox.text,3)
end if

Note that the text property is only available if the textbox has
focus. Otherwise use the value property.

-Tom.
Microsoft Access MVP










- Show quoted text -

I tried a different code few days ago and it does the same thing.
Here is my code:

If Mid(Me.SalesOrder.Text, 1, 2) = "1K" Then
Me.SalesOrder.Text = Mid(Me.SalesOrder.Text, 3, Len
(Me.SalesOrder.Text) - 2)
The problem now that I want when I scan sales order starts with "1K"
to go to sales order field and when I scan part number starts with "P"
to go to Part number field.
Could you please help with that?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top