recordsetClone

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
 
R

ruralguy via AccessMonster.com

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
 
M

Moff

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
 
R

ruralguy 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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top