Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    73

    Unanswered: How to pass values from to form?

    I have been reading alot on this subject and there appears to be many methods. I need a method that applies to my situation, but not sure how to do it. I have two tables and two forms. I want to fill in the first form then push a button to open the second form and have the current primary key value from form 1 inserted into a field in form 2. Do I use a filter, macro, module, stored procedure? Could someone give me some direction please?

    Thanks,
    X-Centric

  2. #2
    Join Date
    Apr 2004
    Location
    South Arica
    Posts
    125
    set the control source of the field on form2 to :
    forms!form1!field

  3. #3
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    This is a copy of a macro action I use and you would place this macro on your Form 1 and attach it to OnClick for a command button or on a label

    OpenForm Form Name: ToLodgeSPPI
    View: Form
    Filter Name:
    Where Condition: [Sum Insured] Is Null
    Data Mode: Edit
    Window Mode: Normal

    SetValue Item: [Forms]![ToLodgeSPPI]![NameNumber]

    Expression: [Forms]![MasterForm]![NameNumber]

  4. #4
    Join Date
    May 2004
    Posts
    73
    WoW, thanks for the fast responses! The expression in the control source worked like a charm.

    Thanks again,
    X-Centric

Posting Permissions

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