Oct 8 2004, 01:53 PM
I am working with FlexGrid control. I have a code snippet that works fine on Visual Basic 6.0, but doesn't work in MS Access 2000. I can't figure out the problem or solution. Can someone clarify for me and if there is a solution to this functionality for Access 2000.
The basic function is to click on any cell in the FlexGrid and a message box will appear with current row and column position. The Mouse Down is the function that is in contorl of the mouse. Which is the very essense of this problem.
code snippet attached.
Oct 8 2004, 02:32 PM
I'm using 2002 sp-2 and when I added mousedown to my flexgrid it produced this
Private Sub InvGrid_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Long, ByVal y As Long)
I copied your code, changed where appropriate and it ran fine. I'd suggest commenting out your code from VB 6.0 and let Access generate the MouseDown Sub and see if it differs from VB.
Oct 8 2004, 03:08 PM
It worked fine for me too!Awesome...thanks man!!!
Oct 8 2004, 10:19 PM
I thought I had this thing figured out, but the following function is blowing up on the Icon and Drag portion of the code. The purpose of this function is to move, but it is not recognizing the dragIcon and drag commands. It works fine with VB6.0, but is blowing up in Access. Any insight here?
Private Sub MSFlexGrid1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Long, ByVal y As Long)
Dim strPath As String
strPath = "C:\Projects\Proj\box.ico"
If Button = 1 Then
DragText = MSFlexGrid1.TextMatrix(MSFlexGrid1.row, MSFlexGrid1.col)
MSFlexGrid1.DragIcon = LoadPicture(Pic) ' load picture.
Oct 11 2004, 08:39 AM
I looked in the object browser and my version of Flexgrid has no Drag or DragIcon members. They might be specific to VB.
Oct 11 2004, 12:32 PM
This article says that there is the Drag method and DragIcon. But they are not working at all. Do you know if this is version specific for the MSFlexGrid?
Oct 13 2004, 07:40 AM
I still find no reference to Drag and DragIcon. All I can assume is that the versions I'm working with are not up to date. If you have them in VB then I'd suggest adding a refeerence to the VB MSFlexGrid.ocx to your Access app and see if that does it.
Sorry, that's my best shot at this point.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here