A.D. Tejpal
adtp at airtelmail.in
Wed Jun 16 11:56:15 CDT 2010
David, Your code is found to run smoothly on Access 2003 as well as Access 2010 desktop without having to apply Nz() function. No error. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: David McAfee To: Access Developers discussion and problem solving Sent: Wednesday, June 16, 2010 00:29 Subject: Re: [AccessD] OpenArgs issue in A2207 :) OK, I thought I was brain farting yesterday, but I know this has something to do with A2007. I've used this code many times: Private Sub Form_Open(Cancel As Integer) 'Opening Args = Mode | RPOID Dim arrX As Variant '****Mode******* arrX = Split(Me.OpenArgs, "|") 'Gives error 'arrX = Split(Nz(Me.OpenArgs, "1|0"), "|") This doesn't give the error Me.txtMode = Nz(arrX(0), 1) '**** RPOID ****** If trim(Nz(arrX(1), "")) <> "" Then Me.txtRPOID = arrX(1) I am now getting an error on Me.Openargs if it is not wrapped in an NZ() function, even though I am passing it a text string. I get a Run-time error 94, Invalid use of Null. Has anybody else seen this (using my example from yesterday) using A2007 or am I just getting goofy in my old age? D