Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: MSHflexgrid Problem when recorset is null

    Hi All,

    I have problem with MSHFlexgrid ,if the recordset is null then the cursor not perform anything i.e
    if recordset return null then click or double click events on the mshflexgrid its not performing any action,
    i have to close the form and open it again.

    below is my code

    vstr = " select * from emp"
    Set adoRS = New ADODB.Recordset
    adoRS.Open vstr, db, , adLockOptimistic
    Set MSHflexgrid.DataSource = adoRS
    Set adoRS = Nothing

    Thanks in advance,
    I really appreciate if any help.

  2. #2
    Join Date
    Jul 2003
    Amsterdam, Nederland
    If there is data in your SQL-Query
    Set the bookmark of the grid to the first row

    if they click a row set it to that row
    otherwise your select/dubble-click function wont work (row/ID will be NULL)
    because its has'nt a active row/ID

    if there is no data trap it and set the function to disabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts