Rabu, 20 Februari 2013

Re: [MS_AccessPros] Re: Custom message to replace write conflict message msaccess 2010-Revised

 

I did a quick search and found the following API call to empty the clipboard. Why not execute it from the form close event and empty the clipboard before closing it?

Private Declare Function apiOpenClipboard Lib "User32" _
Alias "OpenClipboard" _
(ByVal hWnd As Long) _
As Long

Private Declare Function apiEmptyClipboard Lib "User32" _
Alias "EmptyClipboard" _
() As Long

Private Declare Function apiCloseClipboard Lib "User32" _
Alias "CloseClipboard" _
() As Long

Function EmptyClipboard()

If apiOpenClipboard(0&) <> 0 Then
Call apiEmptyClipboard
Call apiCloseClipboard
End If

End Function

Jeff

----- Original Message -----

Doc

I don't think you can trap that one. It's an internal message and not related to any form object as far as I know. But something else is going on. That message should not come up. It only comes up when you actually copy several records.

Can you post the code you have behind your form?

Bill

--- In MS_Access_Professionals@yahoogroups.com , drnorbert@... wrote:
>
> Please advise if I can trap the error and disregard:
>
> "You copied a large amount of data onto the Clipboard" is showing when the second user is closing the form after closing the message box: "This record was edited by someone while you....".
>
> Thanks
>
>
>
> --- In MS_Access_Professionals@yahoogroups.com , drnorbert@ wrote:
> >
> > Bill
> >
> > Just check again and the message: "You copied a large amount of data onto the Clipboard" is showing when the second user is closing the form after closing the message box: "This record was edited by someone while you....".
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com , drnorbert@ wrote:
> > >
> > > Bill
> > > Great solution!
> > >
> > > You are correct the err=7787.
> > >
> > > If the form's Record Locks property is set to 'Eited Record'then the other user can't edit her record, this may be a good solution only if is a way to limit the time the first user (the one who locked the record) in edit mode.
> > >
> > > Also seems like I am getting an intermittent message that the record is copied to the clipboard.
> > >
> > > I am going to keep testing and give you some more feedback.
> > >
> > > Thanks
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com , "Bill Mosca" wrote:
> > > >
> > > > Dr Norbert
> > > >
> > > > Do you get an error number on that message? If so you can use the Form_Error event to trap it.
> > > >
> > > > I think something like this will work:
> > > > Private Sub Form_Error(DataErr As Integer, Response As Integer)
> > > > If DataErr = 7787 Then
> > > > MsgBox "This record was edited by someone while you " _
> > > > & "were making edits." & _
> > > > "Your edits cannot be saved. Please try again."
> > > > Response = acDataErrContinue
> > > > Me.Undo
> > > > End If
> > > > End Sub
> > > >
> > > > And do you have the form's Record Locks property set to Edited Record?
> > > >
> > > > Bill
> > > >
> > > > --- In MS_Access_Professionals@yahoogroups.com , drnorbert@ wrote:
> > > > >
> > > > >
> > > > > Bill the db is split Backend is in SQL 2008- I recall n article from Stan Getz however I can't find it now-the idea is to disable the Standard write conflict message which comes up when 2 or more users are editing the same record at the same time and replace it with a simpler message by trapping the lock type err msg.
> > > > > --- In MS_Access_Professionals@yahoogroups.com , "Bill Mosca" wrote:w
> > > > > >
> > > > > > I don't think that is possible. And by the way, you won't get that message if you split the database putting all the tables in one back end file in a shared folder and give each user his own copy of the front end file containing all the forms, reports, queries, etc.
> > > > > >
> > > > > > That is the proper way to set up a multi-user database in Access.
> > > > > >
> > > > > > Regards,
> > > > > > Bill Mosca, Founder - MS_Access_Professionals
> > > > > > http://www.thatlldoit.com
> > > > > > Microsoft Office Access MVP
> > > > > > https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
> > > > > > My nothing-to-do-with-Access blog
> > > > > > http://wrmosca.wordpress.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In MS_Access_Professionals@yahoogroups.com , drnorbert@ wrote:
> > > > > > >
> > > > > > > I would like to create a custom message to replace and disable the msaccess 2010 multiuser message.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

--

Jeffrey Park Jones
Excel, Access, Word, Office Expert
Excel and Access, LLC®
http://ExcelAndAccess.Com

919-671-9870
5109 Deer Lake Trail
Wake Forest, NC 27587
jpjones23@centurylink.net

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (12)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar