Link to home
Start Free TrialLog in
Avatar of tbsgadi
tbsgadiFlag for Israel

asked on

Append Selected Records to Another Table

Hi Experts,
Has anybody got some nice function/code to copy selected rows of a continuous form/subform and append them in the same/another table?

Gary
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

How are you selecting?

To be sure of being able to do this you need a BOUND checkbox (so a field in the table) so that users can select by clicking the checkbox.

However there can be issues if you have multiple users doing this at the same time.
You then need to look at using a local table that has ID values and a yes/no field and you include this table as part of the recordsource.

If you are ALWAYS selecting contiguous records then it is possible to use code without a checkbox but this solution will not work if there is any gap in the selection.

So back to the question at the top....
Avatar of tbsgadi

ASKER

I was really looking for compact code that uses SelHeight or similar.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<Append Selected Records to Another Table>
<I was really looking for compact code that uses SelHeight or similar. >

Another approach would be to use a listbox to display the records.

Then you could even select non-contiguous records, ...then easily collect the ID's, then copy the records based on the collected ID's...