[AccessD] Openargs Mystery

Bill Benson bensonforums at gmail.com
Tue Apr 29 10:07:10 CDT 2014


@Art, could you tell me what you mean by "as soon as anything happens" ??

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, April 29, 2014 10:39 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Openargs Mystery

Rocky,

This is known behaviour. If you really want to keep the OpenArgs then grab them immediately and store them; otherwise they are toast as soon as anything happens.


On Tue, Apr 29, 2014 at 10:32 AM, Gustav Brock <gustav at cactus.dk> wrote:

> Hi Rocky
>
> Have you tried removing the call of adhScaleForm?
>
> /gustav
>
> -----Oprindelig meddelelse-----
> Fra: accessd-bounces at databaseadvisors.com [mailto:
> accessd-bounces at databaseadvisors.com] På vegne af Rocky Smolin
> Sendt: 29. april 2014 15:52
> Til: 'Access Developers discussion and problem solving'
> Emne: [AccessD] Openargs Mystery
>
> Dear List:
>
> I call a form which is bound to a table with a list of companies.  The 
> called form is where the data for the company is entered/edited.  So I 
> pass the autonumberID, the PK of the company to the called form, do a 
> FindFirst, and walla! company is displayed.  I use this technique a lot.
>
> So the calling statement is:
>
>       DoCmd.OpenForm "frmAssociations", , , , , , 
> Me.fldSRAssociationID
>
> I put a breakpoint here and hover over Me.fldSRAssociationID and sure 
> enough the value  10005 is in Me.fldSRAssociationID.
>
> Press F8 and the _Open event of the called form executes:
>
> Private Sub Form_Open(Cancel As Integer)
>
>     Call adhScaleForm(Me, 1600, 800, 96, 96, rctOriginal)
>
>     If Not IsNull(Me.OpenArgs) Then
>         Me.RecordsetClone.FindFirst "fldAssociationID = " &
> Val(Me.OpenArgs)
>         Me.Bookmark = Me.RecordsetClone.Bookmark
>     End If
>
> End Sub
>
> At the point where the first line of code is ready to execute (I'm in 
> break mode now so the execution stops on every line) I hover over 
> Me.OpenArgs and it shows Me.OpenArgs = Null.
>
> Where's my OpenArg?  Why does it disappear.  I never saw this behavior 
> before.  Any ideas?
>
> This is A2003 BTW.
>
> MTIA
>
> Rocky
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



--
Arthur
--
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