473,836 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clear clipboard use to fix PasteAppend error

6 New Member
I am using the following routine to copy a row and append it to the table. The user then changes appropriate information relevant to the current date.

I keep getting an error when using CopyPA macro as posted. The error: Action failed Condition: True Action Name: RunCommand Arguments: 38.

When I halt it, the message "the command or action 'PasteAppend' is not available now". Sometimes it will work, but then other times, I get the error. From what I found while searching for this error, the clipboard is full at the time and cannot accept anything more. I attempted to add a routine to clear the clipboard, and that doesn't seem to be working. Perhaps I don't have it defined correctly. Could someone look at this and tell me if I have the functions/sub correctly defined in the right location? Can you tell me why I am getting the error and if I am on the right track? I am using Access 2003.
CopyPA macro:
Expand|Select|Wrap|Line Numbers
  1.  
  2.  RunCommand SelectRecord
  3.  RunCommand Copy
  4.  RunCommand PasteAppend 
VBA:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub CopyRecord_Click() 
  3. On Error GoTo Err_CopyRecord_Click
  4.  
  5. Dim stDocName As String 
  6. stDocName = "CopyPA" 
  7. DoEvents
  8. DoEvents
  9. DoEvents
  10. DoEvents
  11. DoCmd.RunMacro stDocName
  12.  
  13. Exit_CopyRecord_Click: 
  14. Exit Sub
  15.  
  16. Err_CopyRecord_Click: 
  17. MsgBox Err.Description 
  18. Resume Exit_CopyRecord_Click
  19. End Sub 
Feb 29 '12
11 3637
Kent T
6 New Member
It's a good thought. I had it banging through my little brain all weekend, and dummy here found that the same commands are available in VBA that I was using in the macro. I have nixed the macro and changed the code to include DoCmd.RunComman d as needed. I was making it entirely too hard. Thanks for all your direction.
Mar 5 '12 #11
NeoPa
32,584 Recognized Expert Moderator MVP
Good to hear :-) There's no reason everyone should have to learn all the same lessons from scratch.
Mar 5 '12 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2242
by: xyz | last post by:
I have a menu item to handle clipboard actions (cut, copy, paste). When I paste text that I copied from a Hungarian web page, the display looks normal on my RichTextBox, but the text retrieved from the clipboard is corrupted. For example, a U with double accent ( byte code x'FB' ) is replaced by a question mark in my txtEdit.Text after a Paste operation. It seems that the Clipboard.GetText() is changing the data. How is it possible to...
6
6129
by: owen | last post by:
Generally speaking, what does it mean when I see a "button" with red text showing this message instead of the control I've dragged onto the web form in Design View.? (But the page works fine at runtime). Does it indicate a problem with References for example? Thanks Owen PS. replies cc'd by email appreciated. owen.southwood@mantix.com
5
12244
by: Chris Mantoulidis | last post by:
Let's say I have this: std::string s1; std::cin >> s1; This will read s1 from cin until it finds a space (or a newline, whichever comes first). Okay this works. But when I want to continue reading it reads what's left over in the cin, and well that's logical.
2
4679
by: zbcong | last post by:
hello in my program,i have following method,it copy a jpg file to clipboard,and works well: Private Sub CopyImage() Dim file As System.IO.Stream = Me.GetType().Assembly.GetManifestResourceStream("ProductCatalog.Nwind.jpg") Clipboard.SetDataObject(System.Drawing.Image.FromStream(file), false) End Sub
6
3570
by: John Lau | last post by:
Hi, I am looking at the MS KB Article 306355: HOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET This article describes how to redirect errors to a custom html error page. All six steps in the article work just fine. Then at the end of the article, there is a little comment about redirecting errors to an aspx page (instead of an html page):
3
1763
by: badboybrown | last post by:
hello, I have used the advice on this site to clear a specific error when a report is generated without any data. Err_cmdLaunchItemsReport_Click: Select Case Err.Number Case 2501 Err.Clear Case Else
1
6316
by: nettleby | last post by:
The Microsoft site has confused me on this issue: http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/iisbook/c06_redirection.mspx?mfr=true Says that: "ASP automatically discards any existing output in the buffer when you call Response.Redirect " But then the code example has a Response.Clear in, i.e. If Err.Number 0 Then
7
3856
by: Newbie | last post by:
How do I clear the clipboard in VB.NET 2003? TIA Newbie
0
1937
by: =?Utf-8?B?SHVtYW0=?= | last post by:
I am developing a windows service that reads from the serial port and then put the data read from the serial to the clipboard, so the client can use Ctrl + v to paste, I am using Clipboard.Clear(); Clipboard.SetData(DataFormats.Text, (Object)IDCard.FirstName); but for some reason it seems that the clipboard does not fill up with data. Is there any security restriction of calling the clipboard methods from the same thread that the windows...
1
2535
by: iammilind | last post by:
In one of my code, I was using vector<> for certain class. In one of my struct, I have 'const' member data. However, vector<>::clear() throws compile error with that: =========================================== struct Test { const string Str; Test(const string str) : Str(str) {} }; struct TestWrapper
0
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9664
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10584
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10248
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7782
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.