Rabu, 24 Agustus 2011

Re: [MS_AccessPros] Command or action pasteappend error

 

John

Don't blame Jim...That looks like wizard-generated code to me.

Bill

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Jim-
>
> That's TERRIBLE code! You should be running an INSERT SQL command, doing a
> Requery, then going to the new record. Trying to "emulate" keyboard-like
> actions in the User Interface will just get you in trouble. Do it all behind
> the scenes. I have no clue what your table or Record Source looks like, so I
> can't give you specific help about the INSERT command.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of luvmymelody
> Sent: Wednesday, August 24, 2011 7:44 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Command or action pasteappend error
>
> Hello all,
>
> I have a database that is acting strange. It is located on the network where
> several users have access to it.
> The issue is that when one user tries to use a button that duplicates a record
> and appends it gets the error The Command Or Action "Pasteappend" Isn'T
> Available Now. Yet when other users try it on their own machines it does not
> give the error but works as coded. Each user has the same references in vba.
>
> We are in a mixed environment right now with OS and Office versions. Below is
> the matrix of the users. The top one is the machine where the issue is
> happening.
>
> Is there something that is getting by me that I do not see?
>
> Thank you for your help
>
> Jim Wagner
>
> User 1 Windows 7, office 2007 gets error
> User 2 Windows XP, Office 2007 No error
> User 3 Windows 7, office 2007 no error
> User 4 Windows 7, office 2010 no error
>
> the code is below
>
> Private Sub duprcd_Click()
> On Error GoTo Err_duprcd_Click
>
> RunCommand acCmdSelectRecord
> RunCommand acCmdCopy
> RunCommand acCmdPasteAppend
>
> Exit_duprcd_Click:
> Exit Sub
>
> Err_duprcd_Click:
> MsgBox Err.Description
> Resume Exit_duprcd_Click
>
> End Sub
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar