How extract data and then make an after event based in extracted n

G

Guest

hello all

I have a Data Base where we Update Production Information when the Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number that is on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production information,
so making this operatio will be not necesary type the W.O number (1042322) in
that combo box, because the system will make automatically

please help
 
J

Jon Lewis

I'm not sure where you're picking up the full W.O. info from but you can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") - 18, 7)
rerturns "1042322"

HTH
 
G

Guest

I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


Jon Lewis said:
I'm not sure where you're picking up the full W.O. info from but you can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") - 18, 7)
rerturns "1042322"

HTH



ldiaz said:
hello all

I have a Data Base where we Update Production Information when the Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number that is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production information,
so making this operatio will be not necesary type the W.O number (1042322)
in
that combo box, because the system will make automatically

please help
 
G

Guest

sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on this code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


ldiaz said:
I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


Jon Lewis said:
I'm not sure where you're picking up the full W.O. info from but you can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") - 18, 7)
rerturns "1042322"

HTH



ldiaz said:
hello all

I have a Data Base where we Update Production Information when the Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number that is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production information,
so making this operatio will be not necesary type the W.O number (1042322)
in
that combo box, because the system will make automatically

please help
 
J

Jon Lewis

You will have to be more specific when you say it does not work.

Private Sub Combo18_AfterUpdate WILL only run after you have updated
Combo18.

I presume that at some point you are choosing your ScanWO. Is this with a
Combo control called Combo18?

If so then try:

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim WON As String
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Nz(WON, "") 'I'm assuming that
IDVolatilDateID and ScanWO are fields of data type String?
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing 'Always explicitly release object variable resourses
when used
End Sub

HTH - if not, be more explicit with when you want the code to execute and
HOW it doesn't work







ldiaz said:
sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on this
code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


ldiaz said:
I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


Jon Lewis said:
I'm not sure where you're picking up the full W.O. info from but you
can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") - 18,
7)
rerturns "1042322"

HTH



hello all

I have a Data Base where we Update Production Information when the
Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number that
is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production
information,
so making this operatio will be not necesary type the W.O number
(1042322)
in
that combo box, because the system will make automatically

please help
 
G

Guest

Hi Jon
this is the problem:
I had the combo18 to find the record and match control, it works perfectly
if I use combo18

but now I want not use combo18, I want to use WON for this operation: where
WON data is pulled from
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
because in ScanWO data in entry like this:*-BFG10423221000210001-*
and the number that I have in my DB is 1042322 and this criteria needs to be
used to find records

Thank you so much for your help

LD



--
Lorenzo Díaz
Cad Technician


Jon Lewis @btinternet.com> said:
You will have to be more specific when you say it does not work.

Private Sub Combo18_AfterUpdate WILL only run after you have updated
Combo18.

I presume that at some point you are choosing your ScanWO. Is this with a
Combo control called Combo18?

If so then try:

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim WON As String
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Nz(WON, "") 'I'm assuming that
IDVolatilDateID and ScanWO are fields of data type String?
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing 'Always explicitly release object variable resourses
when used
End Sub

HTH - if not, be more explicit with when you want the code to execute and
HOW it doesn't work







ldiaz said:
sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on this
code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


ldiaz said:
I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


:

I'm not sure where you're picking up the full W.O. info from but you
can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") - 18,
7)
rerturns "1042322"

HTH



hello all

I have a Data Base where we Update Production Information when the
Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number that
is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production
information,
so making this operatio will be not necesary type the W.O number
(1042322)
in
that combo box, because the system will make automatically

please help
 
J

Jon Lewis

So how do you select the ScanWO from which to extract the WOM in order to
find the relevant record?




ldiaz said:
Hi Jon
this is the problem:
I had the combo18 to find the record and match control, it works perfectly
if I use combo18

but now I want not use combo18, I want to use WON for this operation:
where
WON data is pulled from
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
because in ScanWO data in entry like this:*-BFG10423221000210001-*
and the number that I have in my DB is 1042322 and this criteria needs to
be
used to find records

Thank you so much for your help

LD



--
Lorenzo Díaz
Cad Technician


Jon Lewis @btinternet.com> said:
You will have to be more specific when you say it does not work.

Private Sub Combo18_AfterUpdate WILL only run after you have updated
Combo18.

I presume that at some point you are choosing your ScanWO. Is this with
a
Combo control called Combo18?

If so then try:

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim WON As String
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Nz(WON, "") 'I'm assuming
that
IDVolatilDateID and ScanWO are fields of data type String?
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing 'Always explicitly release object variable
resourses
when used
End Sub

HTH - if not, be more explicit with when you want the code to execute
and
HOW it doesn't work







ldiaz said:
sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on this
code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


:

I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


:

I'm not sure where you're picking up the full W.O. info from but you
can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") -
18,
7)
rerturns "1042322"

HTH



hello all

I have a Data Base where we Update Production Information when the
Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number
that
is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production
information,
so making this operatio will be not necesary type the W.O number
(1042322)
in
that combo box, because the system will make automatically

please help
 
G

Guest

I have an scan reader that put an entire text in ScanWO
like:-*BFG10423221000210001-*
in the after event I extract the number:1042322 into textbox WON , that is
the number that I have in my DB,

with this number the combo18 work perfectly, but now using the scan reader I
want to make the same operation like using combo18

thanks for your help
--
Lorenzo Díaz
Cad Technician


Jon Lewis @btinternet.com> said:
So how do you select the ScanWO from which to extract the WOM in order to
find the relevant record?




ldiaz said:
Hi Jon
this is the problem:
I had the combo18 to find the record and match control, it works perfectly
if I use combo18

but now I want not use combo18, I want to use WON for this operation:
where
WON data is pulled from
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
because in ScanWO data in entry like this:*-BFG10423221000210001-*
and the number that I have in my DB is 1042322 and this criteria needs to
be
used to find records

Thank you so much for your help

LD



--
Lorenzo Díaz
Cad Technician


Jon Lewis @btinternet.com> said:
You will have to be more specific when you say it does not work.

Private Sub Combo18_AfterUpdate WILL only run after you have updated
Combo18.

I presume that at some point you are choosing your ScanWO. Is this with
a
Combo control called Combo18?

If so then try:

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim WON As String
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Nz(WON, "") 'I'm assuming
that
IDVolatilDateID and ScanWO are fields of data type String?
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing 'Always explicitly release object variable
resourses
when used
End Sub

HTH - if not, be more explicit with when you want the code to execute
and
HOW it doesn't work







sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on this
code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


:

I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


:

I'm not sure where you're picking up the full W.O. info from but you
can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") -
18,
7)
rerturns "1042322"

HTH



hello all

I have a Data Base where we Update Production Information when the
Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the number
that
is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production
information,
so making this operatio will be not necesary type the W.O number
(1042322)
in
that combo box, because the system will make automatically

please help
 
J

Jon Lewis

<in the after event I extract the number:1042322 into textbox WON , that is
the number that I have in my DB>

What Event are you using?

Can you not use the same event for finding the target record?

HTH





ldiaz said:
I have an scan reader that put an entire text in ScanWO
like:-*BFG10423221000210001-*
in the after event I extract the number:1042322 into textbox WON , that is
the number that I have in my DB,

with this number the combo18 work perfectly, but now using the scan reader
I
want to make the same operation like using combo18

thanks for your help
--
Lorenzo Díaz
Cad Technician


Jon Lewis @btinternet.com> said:
So how do you select the ScanWO from which to extract the WOM in order to
find the relevant record?




ldiaz said:
Hi Jon
this is the problem:
I had the combo18 to find the record and match control, it works
perfectly
if I use combo18

but now I want not use combo18, I want to use WON for this operation:
where
WON data is pulled from
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
because in ScanWO data in entry like this:*-BFG10423221000210001-*
and the number that I have in my DB is 1042322 and this criteria needs
to
be
used to find records

Thank you so much for your help

LD



--
Lorenzo Díaz
Cad Technician


:

You will have to be more specific when you say it does not work.

Private Sub Combo18_AfterUpdate WILL only run after you have updated
Combo18.

I presume that at some point you are choosing your ScanWO. Is this
with
a
Combo control called Combo18?

If so then try:

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim WON As String
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)
Set rs = Me.Recordset.Clone
rs.FindFirst "[IDVolatilDateID] = " & Nz(WON, "") 'I'm
assuming
that
IDVolatilDateID and ScanWO are fields of data type String?
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing 'Always explicitly release object variable
resourses
when used
End Sub

HTH - if not, be more explicit with when you want the code to execute
and
HOW it doesn't work







sorry I misunderstood your message,
here is the code
WON = Mid([ScanWO], Len([ScanWO]) - 18, 7)


now it works perfectly, but now the question is:
how run this code:
=============================================
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
================================================

because it only run when I use the Combo18, But I have changed on
this
code
to WON
but is still does not work

please help

thanks in advance





--
Lorenzo Díaz
Cad Technician


:

I don't understand,

I have a field named: scanWO, where I need to extract this number:

1042322

please help
--
Lorenzo Díaz
Cad Technician


:

I'm not sure where you're picking up the full W.O. info from but
you
can use
the Mid and Len functions to extract the number you want:

Mid("*-BFG10423221000210001-*", Len("*-BFG10423221000210001-*") -
18,
7)
rerturns "1042322"

HTH



hello all

I have a Data Base where we Update Production Information when
the
Work
Order pass to every process,
If I scan the W.O. this is the information it brings
*-BFG10423221000210001-*
I want to extract the number 1042322, because this is the
number
that
is
on
the DB, these number are always 7 digits,
and is located 12 digits before of the end of the text
then I want to make this operation;
==============================================
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
===============================================

this [Combo18] find the record where we can update production
information,
so making this operatio will be not necesary type the W.O
number
(1042322)
in
that combo box, because the system will make automatically

please help
 

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