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.
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
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.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,835
Office Version
  1. 365
Platform
  1. Windows
Why do you want to 'clone' a record?
 

PB7

Board Regular
Joined
Mar 1, 2011
Messages
58
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.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,835
Office Version
  1. 365
Platform
  1. Windows
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.:)
 

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,523
Messages
5,529,333
Members
409,863
Latest member
stacy09
Top