[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


MS FlexGrid Checkbox and MS Access

Posted on 2004-10-27
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 85
ID: 12427339
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.

Author Comment

ID: 12427494

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

Any other ideas?

Accepted Solution

modulo earned 0 total points
ID: 13161574
PAQed with points refunded (125)

Community Support Moderator

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 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