Update fields in Datagrid 6.0 component

Posted on 2009-04-27
Last Modified: 2013-12-25
Hi all,

This is my first time i work with the datagrid component ... i see all my data in the grid, but i can't change (update) the values in the grid? In the properties of the datagrid i cheked AllowUpdate, AllowAddNew, allowDelete.

Any one an idea?
connAccess.Open "Provider= Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path & "\mydb.mdb;"

connAccess.CursorLocation = adUseClient

rsData.Open "select field1, field2, field3 from tbl_data where not isnumeric(field1)", connAccess

Set DataGrid1.DataSource = rsdata

Open in new window

Question by:De_Wim99
    LVL 13

    Accepted Solution


    good morning!

    is there an error message?

    make sure the recordset locktype is adLockOptimistic.

    try sumthing like this...

    rsData.Open "select field1, field2, field3 from tbl_data where not isnumeric(field1)", connAccess, adOpenDynamic, adLockOptimistic

    i hope i could give u some idea...
    LVL 4

    Author Closing Comment

    That's it!
    Thanks a lot
    LVL 13

    Expert Comment


    I'm glad i could help! :-)


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now