I am trying to check for a duplicate Inventory/Warehouse combination entered in the Inventory Transfer screen using the below code. As I tab off the whseloc field where the check is done, the whole line goes blank. Please help!
Private Sub cWhseLoc_Chk(ChkStrg As String, retval As Integer)
Dim invtid As String
Dim whseloc As String
Dim lineref As String
Dim mem_detail As Integer
Dim rownbr As Integer
Dim MemMaintFlg As Integer
Dim InvtidCheck As String
Dim WhselocCheck As String
Dim linerefCheck As String
Call GetBufferValue("bintran.lineref", lineref)
invtid = GetObjectValue("cinvtid")
whseloc = GetObjectValue("cwhseloc")
mem_detail = GetGridHandle("Spread1")
rownbr = MGetRowNum(mem_detail)
serr1 = MFirst(mem_detail, MemMaintFlg)
While (serr1 = 0)
'get the inventory on loop line
Call GetBufferValue("bintran.InvtID", InvtidCheck)
Call GetBufferValue("bintran.whseloc", WhselocCheck)
Call GetBufferValue("bintran.lineref", linerefCheck)
If Trim(InvtidCheck) = Trim(invtid) And Trim(WhselocCheck) = Trim(whseloc) And Trim(lineref) <> Trim(linerefCheck) Then
MsgBox "Inventory ID/Warehouse Combination already used"
End If
serr1 = MNext(mem_detail, MemMaintFlg)
Wend
Call msetrownum(mem_detail, rownbr)
End Sub
*This post is locked for comments