Problem W/ SelectRecord/Copy/PasteAppend

PB7

Board Regular
Joined
Mar 1, 2011
Messages
58
Hello fellow Access users.

I had an Access macro, which worked fine with these commands:

RunCommand SelectRecord
RunCommand Copy
RunCommand PasteAppend

These commands copied a new record to a table, when a form's checkbox was checked.

Suddenly, while not changing the above, but after numerous small tweeks to various database objects, the above commands do insert the needed extra record, but without copying the contents of the original, selected record.

The intent is to copy/paste append a clone of a record, not a blank record.

The cloning functionality was lost somewhere along the db development process, and I have no idea what I may have inadvertently done, to make the 3 commands work differently now.

But I want Access to copy/paste/append a copy of the record I selected.

Thanks in advance for any help on this one.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
This seems quite strange but then again, it is a Microsoft product. Have you tried compacting and repairing by any chance? That is about the only thing I can think of. Either that or copying all of your tables/forms/queries, etc over to a new db. Sometimes that helps if something got corrupted.

Are those commands in a Macro or VBA? Looks like Macro, but just want to check.
 
Upvote 0
Why do you want to 'clone' a record?
 
Upvote 0
Montez, Norie, thanks for taking the time to reply to my issue.

When I said clone, just meant copying a record, which is a major part of the process with this particular db.

Anyways, after many hours, I never could pinpoint or attribute the reason that Access form, and those macro commands, worked differently. I compact and repair a lot.

I basically re-constructed the form again, using the select/copy/paste append commands again, inside a a macro.

It worked, when I re-built the form. Really exhausted by Access and its eccentricities. Mondez, think you hit the nail on the head. There must have been some corruption in the form, to cause this problem. Many thanks for the good help here.
 
Upvote 0
If you really want to duplicate a record, which I'll admit I don't really understand, you could do it by running a simple query.

That could be done with some simple code.

To be honest I don't quite get why people try and trigger/run menu items for this sort of thing.

It's seems to be hit or miss to me and reminds of the dreaded Sendkeys.:eek:

If you are interested in the code post back and I'm sure someone can help, might even be me.:)
 
Upvote 0
Glad you got it worked out. One thing that I have noticed a lot working with Access is that it seems objects and controls can get corrupted for what appears to be no reason. Not sure what version of Access that you are using, but it still haappens in 2007 to me quite a bit. That is why anytime I am going to make "major" changes to forms or queries, and even tables at times, I make a simple copy of that object so that I don't have to go back to zero.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top