[AccessD] Puzzled.... Error 3188

Max Wanadoo max.wanadoo at gmail.com
Wed Jun 10 16:41:30 CDT 2009


Hi Robert,

If your line is

Nz(Me.Quick_History,)

Should't it be

Nz(Me.Quick_History,"")

Or whatever you want the null value to return.  If nothing, remove the
trailing comma

Have you tried 

Me.parent!txtComment = Nz(Me!Quick_History, "") 

I am assuming the control on the parent form is a text control.

If you comment out the error line, do the following lines run ok?


Max
Ps. I always use dot for properties and ! for controls.   I am never
confused as to which is which.

If "dot references to the old query's fields will fail at runtime"  then why
use it?




-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert
Sent: 10 June 2009 22:19
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Puzzled.... Error 3188

Hello Max,

Thanks for responding, 

My Responses interspersed below....


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Tuesday, June 09, 2009 11:21 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Puzzled.... Error 3188

>>Hi Robert,
>>I am assuming from what you have written that frmServicesNavigator is also
>>the form that you are calling this from. IOW you are calling the same from
>>from within the OnCurrent of the same form...

Not exactly, The code is on the subform (Main Form is frmServicesNavigator
/Sub Form is frmServicesNavigatorSub). Specifically on the OnCurrent event
of frmServicesNavigatorSub.

SNIP CODE

>>You were also referring to controls using the DOT as if they were
properties
>>or methods, you should use the EXCLAM ! to refer to controls.

Hmmm, 
 Now you have me thinking.. Why is that wrong? 

>From Michael Kaplan.

1) The dot gives you early binding and is resolved at compile time, the bang
is resolved at runtime. 
2) In the case of Forms, both controls and fields in the underlying query
can be referenced via a dot since they are all in the type library for the
form. 
3) Also in the case of Forms, if you change the underlying query at runtime
- dot references to the old query's fields will fail at runtime since update
of the Form's type library cannot happen at runtime. 
4) Because the dot is early bound, IntelliSense happens by default with the
dot, not with the bang. 
5) The dot (since it is early bound) is faster than the bang, but no one
runs enough code that uses these items enough for the performance difference
to actually matter.

AND

http://blogs.msdn.com/frice/archive/2004/02/18/75685.aspx

and I have tried both, but it makes no difference, the error still persist.

This is so strange, All I want to do (and have done hundreds of times), is
copy the text in a bound field that is located on a sub form to a unbound
control that is located on the main form (from the sub form)..

I have confirmed today that if I comment (.txtComment =
Nz(Me.Quick_History,) out, the error disappears. 

I just do not understand why I'm getting this error in this case, it doesn't
make any sense.



WBR
Robert



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert
Sent: 10 June 2009 01:40
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

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list