How to open a "detail" form from a "summary" form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sueb
    Contributor
    • Apr 2010
    • 379

    How to open a "detail" form from a "summary" form

    I have a new single-table database (it hasn't been released to the users at all yet) in which I've created two forms that look at the same data: one form which has a spread-sheet-like format, and displays a few fields for all the records in the table, and another form that displays all the fields for a single record at a time. I'd like to be able to have a button on the summary form that opens the detail form for the particular record selected (and it's all right if the detail form allows paging through other records).

    I'm uploading the database, if that helps. I haven't yet split the front/back ends, so it's just in one file, and the uploaded version contains dummy data.

    (Edit: You'll see that I already tried to do this using code similar to what works for a parent/child table arrangement, but since this is a single table, I didn't know the sytax for "simply open another form for this same record".)
    Attached Files
  • munkee
    Contributor
    • Feb 2010
    • 374

    #2
    Sueb,

    This is really easy once you know how and to be honest you were very close on your attempt.

    To do this go to your overview form in desing view.

    Ensure you have the control bar up so you can add buttons etc.

    Make sure you have the magic wand selected so control wizard will be used whenever you place a button.

    Place a command button exactly as you have with the"+" signs on.

    The control wizard will pop up.

    Select to open a form from the form operations menu.

    You will be asked what you would like the button to open, select "Contact Details".

    You should then change the option button to "Open the form and find specifc data to display".

    Now you are presented with two columns showing fields from each of the forms. From what I can see the one field which definitely will link the two forms together in some form of relationship is the "Patiend MR #". So select both of these in each column. Then ensure you click the "<->" button in the centre of the two columns. This will display the relationship at the bottom.

    From here select how you want the button to be displayed to suit yourself.

    Then select a suitable name for the button such as cmdDetail and then finish.

    Sorry if the explenation is not great, I have also uploaded your database edited with the code working.
    Attached Files

    Comment

    • sueb
      Contributor
      • Apr 2010
      • 379

      #3
      munkee, the explanation was GREAT! perfectly clear and easy to follow, and exactly what I needed. Especially because now I know how that code I tried to modify was created--thanks a million!

      Comment

      Working...