By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Handle Selected Records

P: n/a
Hi,

Access 2002.

I've got a form in datasheet view. I want the user to be able to
trigger an action on the rows that he currently has selected in the
datasheet.

Like:
User loads data and reviews them.
User selects one ore more rows with his mouse.
User clicks on a button and some magic happens.

I've tried to achieve this with some code like this:

Dim LeftRS As DAO.Recordset
Set LeftRS = Me!Child14.Form.RecordsetClone
With LeftRS
.MoveFirst
Do While Not .EOF
If .<isselectedThen
<magic>
End If
.MoveNext
Loop
End With

But how do I know if a record was selected? Unforunately I don't find a
way to find out.
Can someone give ma a hint?

Thanks in advance,
Stephan

Oct 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

steph wrote:
Hi,

Access 2002.

I've got a form in datasheet view. I want the user to be able to
trigger an action on the rows that he currently has selected in the
datasheet.

Like:
User loads data and reviews them.
User selects one ore more rows with his mouse.
User clicks on a button and some magic happens.

I've tried to achieve this with some code like this:

Dim LeftRS As DAO.Recordset
Set LeftRS = Me!Child14.Form.RecordsetClone
With LeftRS
.MoveFirst
Do While Not .EOF
If .<isselectedThen
<magic>
End If
.MoveNext
Loop
End With

But how do I know if a record was selected? Unforunately I don't find a
way to find out.
Can someone give ma a hint?

Thanks in advance,
Stephan
It's not easy. Look at http://www.mvps.org/access/forms/frm0033.htm
for an example of how to do this.

Bruce

Oct 18 '06 #2

P: n/a

steph wrote:
Hi,

Access 2002.

I've got a form in datasheet view. I want the user to be able to
trigger an action on the rows that he currently has selected in the
datasheet.

Like:
User loads data and reviews them.
User selects one ore more rows with his mouse.
User clicks on a button and some magic happens.

I've tried to achieve this with some code like this:

Dim LeftRS As DAO.Recordset
Set LeftRS = Me!Child14.Form.RecordsetClone
With LeftRS
.MoveFirst
Do While Not .EOF
If .<isselectedThen
<magic>
End If
.MoveNext
Loop
End With

But how do I know if a record was selected? Unforunately I don't find a
way to find out.
Can someone give ma a hint?

Thanks in advance,
Stephan
Look at http://www.mvps.org/access/forms/frm0033.htm for an example of
how to do this.

Bruce

Oct 18 '06 #3

P: n/a
de***************@gmail.com wrote:
steph wrote:
Hi,

Access 2002.

I've got a form in datasheet view. I want the user to be able to
trigger an action on the rows that he currently has selected in the
datasheet.

Like:
User loads data and reviews them.
User selects one ore more rows with his mouse.
User clicks on a button and some magic happens.

I've tried to achieve this with some code like this:

Dim LeftRS As DAO.Recordset
Set LeftRS = Me!Child14.Form.RecordsetClone
With LeftRS
.MoveFirst
Do While Not .EOF
If .<isselectedThen
<magic>
End If
.MoveNext
Loop
End With

But how do I know if a record was selected? Unforunately I don't find a
way to find out.
Can someone give ma a hint?

Thanks in advance,
Stephan

It's not easy. Look at http://www.mvps.org/access/forms/frm0033.htm
for an example of how to do this.

Bruce
Good example - Thanks very much for the link!

Oct 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.