Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
rs.Open "select * from YJCS where XLEFT<"&X, And XRIGHT>"&X,and YLEFT<"&Y, And YRIGHT>"&Y ", cnn, adOpenKeyset, adLockOptimistic
(上面第二個AND位置顯示缺少表達式)
rs.Fields("X1") = xnow + x2 - x1
rs.Fields("Y1") = ynow + y2 - y1
rs.Update
rs.Close
End Sub
"select * from YJCS where XLEFT< " & X & " And XRIGHT>" & X & " And YLEFT<" & Y & " And YRIGHT>" & Y