Error Copying Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a multiuser environment some users are able to click on a button which
duplicates the current record they are on, but other users get the message
"The command or Action 'copy' isn't available now".

Any suggestions would be greatly appreciated.

Thank you,

Sarah
 
Hi,


You cannot move to another record (such as a copy will do) if the actual
record is dirty and CANNOT be saved (because a required field is not
supplied, or other reasons).


Hoping it may help,
Vanderghast, Access MVP
 
I already know that's not the case. A record which can be copied by one user
may not be able to be copied by another user. And what happens is that the
word Copying... will appear in the status bar at the bottom left corner and
not do anything. It will just stay there and not do the copy.

Any other ideas?
 
Hi,


Is this a privilege problem? these users CAN elsewhere, in your
application, create a new record?



In the button click event procedure, can you use

Me.Dirty=false

before starting the copy process? that will insure you that the actual
record in NOT dirty anymore.




What command(s) are you using? based on DoCmd.DoMenuItem, on RunCommand, or
are you making a recordset.AddNew, or through SQL ? The later two are
probably more robust than the first two.




Vanderghast, Access MVP
 
This is not a privilege problem. I tried what you said, but it still does
the same thing. I am using the docmd.domenuitem. From talking to one of the
users of the database, it sounds like it's a different problem. What happens
is when the user enters the form and does a copy record, it works fine. But
when the user closes out of the form and then re-opens it and trys to execute
the copy command the following error is displayed:

The command or Action 'Copy' isn't available now.
 
Hi,


First time I heard of this kind of problem. Is it possible to hide the
form rather than closing it, and to turn it visible again (or that would
create too many modifications to your code)? Is the error disappear after
30-60 seconds? if so, it is either a problem of bandwidth with the network
connection, either the server is too busy, and maybe, the form OnError event
can trap the error, where you can ask the user to retry in 30-60 seconds.
That is just assumptions, since, as I said, I never heard of this specific
problem before. Alternatively, you can try with a recordset method, rather
than with doCmd:


Me.RecordsetClone.AddNew
Me.RecordsetClone!field1 = Me.ControlForF1
Me.RecordsetClone!field2 = Me.ControlForF2
...
Me.RecordsetClone!fieldN = Me.ControlForFN
Me.RecordsetClone.Update
Me.RecordsetClone.Bookmark = Me.RecordsetClone.Bookmark




Hoping it may help,
Vanderghast, Access MVP
 
I took your suggestion from your second e-mail by using an sql statement
rather than the docmd.domenuitem. That fixed the problem. Thanks for all
your time and your very good suggestions!

Sarah
 
Back
Top