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

MS FlexGrid Checkbox and MS Access

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"

    flxItems.Clear
    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?
0
jg0069_2002
Asked:
jg0069_2002
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
 
jg0069_2002Author Commented:
LSMConsulting,

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

Any other ideas?
0
 
moduloCommented:
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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