How make the same Operation as ComboBox using a Bar Code Reader

G

Guest

hello all
I have a DB where I have Work Order # like 1042253 and when I want to Update
Production status on it, I use the Combo18 to Find the record and so Update
any information in some fields, here is the statements that I put in the
after event of the combo
===================================================
Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Str(Nz(Me![Combo18], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
===================================================

but now I wan to make the same operation but using an scanner (Bar Code
reader) and not the combo18, the problem is that the Work Order contain more
information in the bar code like:
*-BA10422531000210452-*
the Work Order is :1042253, I know how extract this number into a Text box
and is using this function:
==========================
Private Sub ScanWO_AfterUpdate()
WOnumber = Mid([ScanWO], Len([ScanWO]) - 18, 7)
====================================

where [ScanWO] is where I scan the Bar code and [WOnumber] is where the
number appear extracted like 1042253

could you help me to make the same operation like Combo18 in order I be able
to find the record after scan the Work Order Bar Code.

Thanks in advance, please reply if you need more information
 
G

George Nicholson

You can copy the code from Combo18_AfterUpdate into ScanWO_AfterUpdate.
Then replace Str(Nz(Me![Combo18], 0)) with WOnumber so that it reads:
rs.FindFirst "[IDVolatilDateID] = " & WOnumber

HTH,
 
G

Guest

Hi george, this Work perfectly

Thank you so much for your help


--
Lorenzo Díaz
Cad Technician


George Nicholson said:
You can copy the code from Combo18_AfterUpdate into ScanWO_AfterUpdate.
Then replace Str(Nz(Me![Combo18], 0)) with WOnumber so that it reads:
rs.FindFirst "[IDVolatilDateID] = " & WOnumber

HTH,

ldiaz said:
hello all
I have a DB where I have Work Order # like 1042253 and when I want to
Update
Production status on it, I use the Combo18 to Find the record and so
Update
any information in some fields, here is the statements that I put in the
after event of the combo
===================================================
Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Str(Nz(Me![Combo18], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
===================================================

but now I wan to make the same operation but using an scanner (Bar Code
reader) and not the combo18, the problem is that the Work Order contain
more
information in the bar code like:
*-BA10422531000210452-*
the Work Order is :1042253, I know how extract this number into a Text box
and is using this function:
==========================
Private Sub ScanWO_AfterUpdate()
WOnumber = Mid([ScanWO], Len([ScanWO]) - 18, 7)
====================================

where [ScanWO] is where I scan the Bar code and [WOnumber] is where the
number appear extracted like 1042253

could you help me to make the same operation like Combo18 in order I be
able
to find the record after scan the Work Order Bar Code.

Thanks in advance, please reply if you need more information
 

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