Skip to Content
avatar image
Former Member

first,previous,next,last Recordset using VB .net

Hi guys,

I created a recordset,

                                    oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

                                    oRecordSet.DoQuery("Select ""ItemCode"",""ItemName"" FROM OITM ORDER BY ""ItemName"" ")

then after that, I created a first,previous,next,last buttons,

                                   Select Case pVal.ItemUID

                                        Case "btnfirst" 'btnFirst

                                            oRecordSet.MoveFirst()

                                        Case "btnprev"

                                            If Not oRecordSet.BoF Then

                                                oRecordSet.MovePrevious()

                                            Else

                                                oRecordSet.MoveLast()

                                            End If

                                        Case "btnnext"

                                            oRecordSet.MoveNext()

                                            If oRecordSet.EoF Then

                                                oRecordSet.MoveFirst()

                                            End If

                                        Case "btnlast"

                                            oRecordSet.MoveLast()

                                        End Select

All my buttons works properly,

now.. I want to create a textbox... on which i can search the itemcode on recordset.. my question  is... how to set the recordset on that ItemCode so that if i click the Buttons, ill get the correct output,,

THANKS,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 03, 2015 at 05:50 AM

    Hi,

         You may try, oTextBox.Value = oRecSet.Fields.Item("ItemCode").Value

    Regards,

    Bry

    Blog: http://www.sap-tips-tricks.com/

    Add comment
    10|10000 characters needed characters exceeded