Select a record from mshflexgrid to delete the data room Charging System

Source: Internet
Author: User
'Define the module-level variable dim nowrow as integer Step 1: Add the following code to the mshflexgrid mousedown event: private sub mfgadddeleteuser_mousedown (button as integer, shift as integer, X as single, Y as single) with mfgadddeleteuser. row =. mouserow nowrow =. row. col = 0. colsel =. cols-1 end withend sub Step 2: Add the following code to the mshflexgrid mouseup event: private sub mfgadddeleteuser_mouseup (button as integer, shift as integer, X as single, y as Single) with mfgadddeleteuser. rowsel = nowrow. colsel =. cols-1 end withend sub Step 3: Add the following code private sub into delete_click () dim rstmrc as ADODB under the "delete" button. recordset dim strsql as string dim strmsg as string 'delete selected records in the database strsql = "delete from user_info where userid = '" & trim (mfgadddeleteuser. textmatrix (mfgadddeleteuser. row, 0) & "'" set rstmrc = executesql (strsql, strmsg)' Delete the selected mfgadddeleteuser from mfgadddeleteuser. removeitem mfgadddeleteuser. row end sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.