Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    27

    Wink Unanswered: Passing Paramenters

    Hello Folks...

    My past question was long and complex... But let me make this one as simple as I can...
    How do I pass parameters to another form that will be opened from the 1st form?

    Thanks!

    Renata
    Atha
    20175337

  2. #2
    Join Date
    May 2004
    Posts
    16
    Use the OpenArgs parameter, for example:

    DoCmd.OpenForm "frmOrder", , , , , acDialog, strOpenArgs

    Then in the OnOpen event of the form, read the argument string and be as simple/sophisticated as needed to interpret the arguments, for example;

    Set tvs = New clsTaggedValues
    tvs.Text = Me.OpenArgs

    I know it is not very elegant, but if you don't mind opening the new form as modal, you can set a global variable and have the new form use that variable in the OnOpen event (which we did all the time before Microsoft added the Open Args parameter).

  3. #3
    Join Date
    Feb 2004
    Posts
    126
    I don't know if this is useful, as I am using an ADP, but I use stored procedures as the recordsources for my forms so I just set the input parameters on the subforms record source to controls on the parent form, and Access handles a lot of the rest.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •