• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1119
  • Last Modified:

Flex Grid - Add, edit and delete

how to add, edit and delete records in Flex Grid and how to update the database through flex grid with using datacontrol and without using datacontrol.
1 Solution
You cannot do any manipulations using MS Flex Grid. It is Read-only.
I have an article by Mr. Frank Sommer, Microsoft Regional director, Northern Ca.
"MSFlexGrid Tips and Tricks"
October 1997

This article shows several trick with Flexgrids , one being to 'float a text box' over the grid to handel the editing.
I tried it and it works! Check the MS site for this report

I am writing this comment for your previous question in which you had asked abount invoice type updates.

If you want to make an invoice type update that is if for one entry of Name & Date there are multiple entries of products, then you can also use a list box.
You can use text boxes to enter & edit or delete items in the list boxes

  you can use the following code for multiple updates.

If working with datacontrol
With Data1.recordset
  For i = 0 to List1.ListCount-1
     .Fields("Name") = txtName.text
     .fields("Date") = txtDate.text
     .fields("BillNo") = txtBillNo.text
     .fields("Item") = List1.List(i)
     .fields("Quantity") = List2.List(i)
     .fields("Rate") = Val(List3.List(i))
  Next i
End With
Yes i've done this myself using a floating textobox postition in the cell when it's clicked.It worked nicely for me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now