MS FlexGrid Checkbox and MS Access

Posted on 2004-10-27
Last Modified: 2010-08-05
Alright heres an interesting question...

I'm using Microsoft Access 2000 and I'm using an MSFLex Grid control to display some records.  I've got the code working for that and now I'm trying to show a check box when the user double clicks on a row.  Sounds simple enough right?

I've found the code for VB to set the .CellPicture property but it doesn't seem to be working in MS Access VBA.  

Here's some sample code to populate the FlexGrid:

Public Sub PopulateCells()

Dim i As Integer

    flxItems.Rows = 10
    flxItems.Cols = 2
    flxItems.FixedRows = 1
    flxItems.FixedCols = 1
    flxItems.TextMatrix(0, 1) = "Item"

    For i = 1 To 10
        flxItems.Row = i - 1
        flxItems.col = 0
        Set flxItems.CellPicture = picChecked.Picture
        flxItems.TextMatrix(i - 1, 1) = "Item " & Format$(i _
            - 1)
    Next i

End Sub

Then when a user double clicks on a cell, I'm using

Set flxItems.CellPicture = picChecked.Picture

Where picChecked is just an Image that I've placed on my form.  When I double click on a cell I get Error 424, Object Required, and the above line of code is highlighted.  

Any ideas?
Question by:jg0069_2002
    LVL 83
    Try this:

    Set flxItems.Object.CellPicture = picChecked.Picture

    Also, you may find that this Method isn't supported in Access ... many ActiveX controls are only partially supported.
    LVL 2

    Author Comment


    Thanks for the comment, but using the above code I still the "Object Required" error message.  

    Any other ideas?

    Accepted Solution

    PAQed with points refunded (125)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    884 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

    17 Experts available now in Live!

    Get 1:1 Help Now