Hi
Within a long event procedure we have the following code. I am nopt familiar with coding that much and cannot work out what it is doing. we have an issues that in Packs table we have a pack code that gets updated but it is adding in an extra digit on th pack ref. I am just wondering if this part of the code as something to do with it. Any chance someone could explain roughly what it is doing in this part of the code. Thanks
' use pack number to find pack details & populate 'packs' table
Set rsPacks = CurrentDb().OpenRecordset("Packs", dbOpenDynaset)
If Len(Trim(arrLine(3))) > 7 Then
Last2 = UCase(Right(arrLine(3), 2))
If Left(Last2, 1) = "_" Then
Last2 = "/" & Right(Last2, 1)
End If
BarCode = GetBarCode(arrLine(3))
' check for no '/'
If Left(Last2, 1) <> "/" Then
Last2 = Right(Last2, 1)
End If
Else
BarCode = GetBarCode(arrLine(3))
Last2 = ""
End If
Within a long event procedure we have the following code. I am nopt familiar with coding that much and cannot work out what it is doing. we have an issues that in Packs table we have a pack code that gets updated but it is adding in an extra digit on th pack ref. I am just wondering if this part of the code as something to do with it. Any chance someone could explain roughly what it is doing in this part of the code. Thanks
' use pack number to find pack details & populate 'packs' table
Set rsPacks = CurrentDb().OpenRecordset("Packs", dbOpenDynaset)
If Len(Trim(arrLine(3))) > 7 Then
Last2 = UCase(Right(arrLine(3), 2))
If Left(Last2, 1) = "_" Then
Last2 = "/" & Right(Last2, 1)
End If
BarCode = GetBarCode(arrLine(3))
' check for no '/'
If Left(Last2, 1) <> "/" Then
Last2 = Right(Last2, 1)
End If
Else
BarCode = GetBarCode(arrLine(3))
Last2 = ""
End If