DoMenuItem Question

G

Guest

I have data copied to the clipboard. I want automate appending it to a table.
I wrote the following code. The table opens but does not append. I can
manually use the menu option "paste append", but I want it to happen all from
a button. I must have the syntax on the DoMenuItem wrong. Can someone see
where I am wrong?

DoCmd.OpenTable "History_CMS_Phone"
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 ' calls the menu
item "Paste Append"
 
G

Guest

8 selects a record. 6 paste appends.

Either which way DoCmd.DoMenuItem is old school and no longer supported. Try
this instead:

DoCmd.RunCommand acCmdPasteAppend
 
G

Guest

Changed the code to DoCmd.RunCommand acCmdPasteAppend and it runs like a
charm. Now I'm New School Too!

Thanks, Charles
 

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