recordsetClone

  • Thread starter Thread starter Moff
  • Start date Start date
M

Moff

Hello,
In a form, I have a SubForm showing a list of actors.
I want to know which actor have been clicked.
This is the 2 subroutines that was working with Access 2003
but doesn't work anymore with Access 2007.
I don't find what is wrong. Can somebody help me please ?

Private Sub actor_name_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub

Private Sub Form_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub
 
FWIW
RecordSetClone is a DAO property.
RecordSet.Clone is an ADODB method.
Hello,
In a form, I have a SubForm showing a list of actors.
I want to know which actor have been clicked.
This is the 2 subroutines that was working with Access 2003
but doesn't work anymore with Access 2007.
I don't find what is wrong. Can somebody help me please ?

Private Sub actor_name_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub

Private Sub Form_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub
 
Thank Ruralguy and forget about my first post. The code was ok. My problem is
when I open the form with the chosen actor, the filter is not working anymore.

ruralguy via AccessMonster.com said:
FWIW
RecordSetClone is a DAO property.
RecordSet.Clone is an ADODB method.
Hello,
In a form, I have a SubForm showing a list of actors.
I want to know which actor have been clicked.
This is the 2 subroutines that was working with Access 2003
but doesn't work anymore with Access 2007.
I don't find what is wrong. Can somebody help me please ?

Private Sub actor_name_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub

Private Sub Form_DblClick(Cancel As Integer)
Dim rs As ADODB.Recordset

Set rs = Me.RecordsetClone
rs.Move Me.SelTop - 1
globalChosenActor = rs![actor_name]
rs.Close
Set rs = Nothing
End Sub

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
What filter?
Thank Ruralguy and forget about my first post. The code was ok. My problem is
when I open the form with the chosen actor, the filter is not working anymore.
FWIW
RecordSetClone is a DAO property.
[quoted text clipped - 26 lines]
 
Back
Top