Hi:
I am in the process of customizing the sales order screen, to bring over information inputted in the manufacturing screen from the lot/serial form into a text box on the main screen. I was able to get the code to display the manufacturing information into the text box on saving the bin lot screen. However, if there is more than one line item in the sales order that is a lot item, the text box continue to display the last manufacturing no. I will like when I click on the various sales rows with lot/serial that the manufacture no. also appears. I am using the following code, which I was able to use on other screens and get the required results but I am not able to do so in the Sales Screen. Could you point out what I maybe missing? Below is the code that I am using. Any assistance will be appreciated.
Private Sub Spread8_LineGotFocus(maintflg As Integer, retval As Integer)
Dim Cur As Integer
Dim SQL As String
Dim gbLotNum As String
Dim strinVtID As String
Dim myDescription As myDescription
Dim str2 As String
Call SetObjectValue("xuser1", "")
str2 = GetObjectValue("cLotSerNbr_8")
strinVtID = GetObjectValue("cinvtid_1")
str2 = Trim(str2)
If (Len(str2) >= 1 And Len(strinVtID) >= 1) Then
SQL = "select MfgrLotSerNbr from LotSerMst where LotSerNbr='" & Trim(RTrim(str2)) & "' and InvtID='" & strinVtID & "'"
Call SqlFetch1(Cur, SQL, myDescription, LenB(myDescription))
Call SetObjectValue("xuser1", myDescription.permissionNum)
Call SetObjectValue("cMfgrLotSerNbr_8", myDescription.permissionNum)
SqlFree (Cur)
Else
Call SetObjectValue("xuser1", "na")
End If
Close (Cur)
End Sub
Thanks
Lisa
*This post is locked for comments