N
NNlogistics
Please forgive me if this is a duplicate question.
I am trying to Change an alpha string to a number. It works in one case and
not the other. I am using the msgbox for trouble shooting. The
txtPOtoRMATransision and txtPOtoRMATransision2 were added during the
troubleshooting process. They are unbound txtboxes. The control source for
Me.txtRMANumber is numeric - long integer. It works for PM0000193-2 and not
for PM0000193-20. Hope this is clear.
Happy New Year to all!
' Change PO number to RMA # if Customer Number is 1
' Change PO number to RMA # if Customer Number is 1
' if not 1 then go to fldseqnumber and add 1 for the RMA Number
If txtCustomerID = "1" Then 'using PM0000193-2 and PM0000193-20 as examples
Me.txtPOtoRMATransision = Left(Me.txtPONumber, 9) & Mid(Me.txtPONumber, 11,
2) 'gives PM00001932 and PM000019320 respectively
MsgBox (Me.txtPOtoRMATransision) 'gives PM00001932 and PM000019320
respectively
Me.txtPOtoRMATransision2 = "8" & Mid(Me.txtPOtoRMATransision, 3)
MsgBox (Me.txtPOtoRMATransision2) 'gives 800001932 and 8000019320 respectively
Me.txtRMANumber = Me.txtPOtoRMATransision2 ' *****here I am getting run time
error "2147352567 the value for this field ins't valid
Me.txtSalesOrderNumber.SetFocus 'Then enter Sales Order Number
I am trying to Change an alpha string to a number. It works in one case and
not the other. I am using the msgbox for trouble shooting. The
txtPOtoRMATransision and txtPOtoRMATransision2 were added during the
troubleshooting process. They are unbound txtboxes. The control source for
Me.txtRMANumber is numeric - long integer. It works for PM0000193-2 and not
for PM0000193-20. Hope this is clear.
Happy New Year to all!
' Change PO number to RMA # if Customer Number is 1
' Change PO number to RMA # if Customer Number is 1
' if not 1 then go to fldseqnumber and add 1 for the RMA Number
If txtCustomerID = "1" Then 'using PM0000193-2 and PM0000193-20 as examples
Me.txtPOtoRMATransision = Left(Me.txtPONumber, 9) & Mid(Me.txtPONumber, 11,
2) 'gives PM00001932 and PM000019320 respectively
MsgBox (Me.txtPOtoRMATransision) 'gives PM00001932 and PM000019320
respectively
Me.txtPOtoRMATransision2 = "8" & Mid(Me.txtPOtoRMATransision, 3)
MsgBox (Me.txtPOtoRMATransision2) 'gives 800001932 and 8000019320 respectively
Me.txtRMANumber = Me.txtPOtoRMATransision2 ' *****here I am getting run time
error "2147352567 the value for this field ins't valid
Me.txtSalesOrderNumber.SetFocus 'Then enter Sales Order Number