Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004

    Unanswered: Linking a Subform on one Form to a different Form

    Hello all,

    I am making a pesticide application database that is required to comply with particular information put forth by a standard called Nature's Choice.

    I have a main form for a chemical mixture prescription (containing the person prescribing the mixture, the date, etc), with two subforms (1.the orchard blocks to be sprayed, and 2.the chemicals to mix in the application).

    Nature's choice require that the spray equiptment be prescribed as well. I figured the best way to do this, would be to prescribe certain spray equiptment to each orchard block.

    There is no room for a subform on that subform, so i decided a button on each orchardblock line that popped up a new form would work good.. BUT

    I don't understand how to link this separate form with master and child links to the subform contained on the main form.

    any help would be greatly appreciated! I am relatively new to the DBForums, and have really never posted to any before, but rather have just searched them and used the answers, So i'd like to apologize for anything i'm doing wrong, or for how simple of a question this may be.

    thanks, and take care

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Look into "input parameters" on the form. You could also use the DoCmd.OpenForm method with a supplied where clause.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2004
    The syntax of the inputparameter property is relativly confusing to me, although i may try it-- because--

    I tried using a where condition, and i am still having a problem.... ( i first set it up by hand, then tried using the wizard, with the same results)

    When i click on the button, i get the pop up form, but it will not go to the correct record unless i close that form, and go to the previous record and back to the new record on the main form.

    I've tried running docmd... save record before the docmd.... open form in the button_click event, but this does nothing.

    If i run docmd....prevrecord then docmd....nextrecord before the open form command, it works fine. But this will obviously not work for the first case (where there is no previous record)

    Anyone like to comment?

    I am going to go ahead and see if i can't figure out the linkcriterea now.

    Thanks again!

  4. #4
    Join Date
    Dec 2004
    Hello all--
    i messed around and found that if i call docmd.recalc before the docmd.openform using the where condition it works.

    If someone thinks there is a better way to do this, please let me know!
    Thanks again

Posting Permissions

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