In access database, I would have a subform and would like to double click on a row/record and have it open a form of that row's record information. Any help will be greatly appreciated.
In a subform I want to select a row and open a main form
Collapse
X
-
hey im a newbie to! :D
what version of vb are u using cos im using vb2008 and this code works for me:
to move the cursor this code:
cursor.position = new point(x,y)
x and y is what ever coordinate u want
i dont no how to force a click im trying 2 find that out 2 but if ur using vb6 i found this but it doesnt work on vb2008:
in a module:
Option Explicit
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Sub forcemouseclick (ByVal dX As Long, ByVal dY As Long)
Dim mouse_x As Long
Dim mouse_y As Long
mouse_x = CLng(dX * 65535 / 1000)
mouse_y = CLng(dY * 65535 / 800)
MOUSEEVENTF_LEF TDOWN Or _
MOUSEEVENTF_LEF TUP, _
mouse_x, mouse_y, 0, 0
End Sub
then to call it from an event from a form use this code
call forcemouseclick (x,y)
i hope that helps u
:)
Comment