Very, very new to Solomon so if I say something stupid, please forgive me :-)
I have a grid that needs six key fields(limit is 5). So I was told that I needed to remove all the key fields and in the chk event for the sixth field, traverse the grid, see if there are any matches and take the appropriate action. The code(pseudo) I have right now
'bTTM was set up with
'mh_TWNTransMap = detailsetup(csr_TTM, Spread1, PNULL, bTTM, LenB(bTTM), PNULL, 0, PNULL, 0, PNULL, 0)
Sub cControl_Chk(ChkStrg As String, retval As Integer)
Dim liGridFetch As Integer
Dim liMaintFlg As Integer
Dim curRecNbr As Integer
Dim myTTM As ourRecord
Dim t As Integer
myTTM = bTTM
curRecNbr = MGetRowNum(mh_TTM)
liGridFetch = MFirst(mh_TTM, liMaintFlg)
Do While liGridFetch = 0
' The appropriate record from the array is now available in bTTM
If (AreTheyEqual(bTTM, myTTM) Then
Debug.Print ("We found a match")
retval = ErrNoMess 'Is this correct, if they are equal, we want to set the cursor to the row that contains the match, and abandon the new row
curRecNbr = MGetRowNum(mh_TTM)
Exit Do
End If
liGridFetch = MNext(mh_TTM, liMaintFlg)
Loop
'myTTM contains what we entered, but the datagrid at the row we were at contains 0,0,0,0 for values, how do we refill the data row with the correct values, if we don;'t have a match
'and if we do have a match, how do we remove the row
Call MSetRow(mh_TWNTransMap, curRecNbr)
End Sub
*This post is locked for comments
I have the same question (0)