A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access 2000 - copy the currently displayed record



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2005, 10:48 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Access 2000 - copy the currently displayed record

I moved from Access 97 to 2000 and am having problems with some code set up
in access97 to copy the currently displayed data in a sub form when a
command button is pressed the commented out code is:

'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 Paste Append

Access 2000 gives me an error on this, I checked it out in Access help and
have the code changed to:

DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, acPaste

Have tried this with and without acPaste on the end, but get the following
error:

"The comand or action "Cut" isn't available now"

Am afraid this means I can't do this with my version of Access 2000/vsn
9.0, 3821 SR-1, Visual Basic vsn 6.0

I checked the News group messages on this subject with no success, lots of
copying but not of the current record as far as I can see.

As usual an help would be greatly appreciated.

Abay




  #2  
Old December 3rd, 2005, 10:56 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Access 2000 - copy the currently displayed record

Actually, a bettwer way would be to use an run an append query that
takes the values from the record and inserts them into the table. If
you're using a field that has an Autonumber, you'll have to list out
every field in the query as opposed to using an astrik as in SELECT *

Abay wrote:
I moved from Access 97 to 2000 and am having problems with some code set up
in access97 to copy the currently displayed data in a sub form when a
command button is pressed the commented out code is:

'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 Paste Append

Access 2000 gives me an error on this, I checked it out in Access help and
have the code changed to:

DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, acPaste

Have tried this with and without acPaste on the end, but get the following
error:

"The comand or action "Cut" isn't available now"

Am afraid this means I can't do this with my version of Access 2000/vsn
9.0, 3821 SR-1, Visual Basic vsn 6.0

I checked the News group messages on this subject with no success, lots of
copying but not of the current record as far as I can see.

As usual an help would be greatly appreciated.

Abay




  #3  
Old December 3rd, 2005, 11:37 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Access 2000 - copy the currently displayed record

Thank you for your suggestion, which is much appreciated .. I tried it out
... only problem I want the copied data top appear immediately on the screen
as it did before in Access97. Using the copy append query after I press the
"copy button" I have to exit the form display and come back in again to see
the newly copied data ...

Is there a way for the data to appear immediately as it did with the code
shown earlier .. am I dong something wrong?

Thanks in advance for a reply

Abay
"Abay" wrote in message
...
I moved from Access 97 to 2000 and am having problems with some code set up
in access97 to copy the currently displayed data in a sub form when a
command button is pressed the commented out code is:

'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 Paste Append

Access 2000 gives me an error on this, I checked it out in Access help and
have the code changed to:

DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, acPaste

Have tried this with and without acPaste on the end, but get the following
error:

"The comand or action "Cut" isn't available now"

Am afraid this means I can't do this with my version of Access 2000/vsn
9.0, 3821 SR-1, Visual Basic vsn 6.0

I checked the News group messages on this subject with no success, lots
of copying but not of the current record as far as I can see.

As usual an help would be greatly appreciated.

Abay






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
current user's name who last edited a record in MS access 2000 Last user's name that modified a record Database Design 2 October 6th, 2005 05:57 PM
How to launch Access 97 from Word 2000 bof General Discussions 4 September 7th, 2005 06:26 PM
Why is a French Spellchecker a "required" update for English speak French Spellcheck Required? General Discussion 23 April 26th, 2005 01:17 AM
MS Access 2000 Record Access Partha Ghosh General Discussion 1 August 9th, 2004 03:49 PM
Runtime Error 2046, when I try to delete a record in an SQL Server table (through an Access 2000 Interface) Nuno Almeida General Discussion 0 July 14th, 2004 11:54 AM


All times are GMT +1. The time now is 12:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.