Dan Waters
dwaters at usinternet.com
Tue Jun 9 21:34:07 CDT 2009
Hi Robert, I would suggest that you take this code out of the current event. Put the code into a general Sub procedure and call it. Per Help: 'The Current event occurs when the focus moves to a record, making it the current record, or when the form is refreshed or requeried.' So, if you are changing data in the current event, you might be firing the current event. I used to use the current event a lot, but no more. Another thing is that you are using a dot(.) after Me instead of a bang(!) like in the other lines. Another thing is that IIRC you get into page locking when you update memo fields even if you've set the database to use record locking. This could be the cause of the errors being intermittent about the record being locked. I think that something in your form/subform is bound. If it wasn't then I don't think that the current event can be called, unless it's explicitly called somewhere else in your code. Also - you could try using this syntax: Me.Parent.txtComment = ' ... ' A few various thoughts on my part - good luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Tuesday, June 09, 2009 7:40 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Puzzled.... Error 3188 I have a form/subform that lists open Service Orders. The user picks the service order they want to work with, open another form to perform various tasks. Everything has been working fine for years.. Recently I added some "features", that in part, involved this line of code that fires on the subforms Current event to simply update a unbound text box on the main form (which is also unbound). With Form_frmServicesNavigator ... ... ... ... ... .txtComment = Nz(Me.Quick_History, "") <<<<< THIS LINE .txtDirections = Nz(Me!Directions, "") .txtComplaints = Nz(Me!CustomerComplaints, "") .txtSysNotes = Nz(Me!SysNotes, "") End with Now on occasion the user gets this error when attempting to update this field (memo field) via a DAO.recordset. "Error 3188 - Could not update; currently locked by another session on this machine..." If I comment this line of code out, all works fine and the error does not show up again. I have tried all manor of variations to reference the main form thinking that may be causing it, but I get the same intermittent results. Any idea's?? WBR Robert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com