Question about forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • didacticone
    Contributor
    • Oct 2008
    • 266

    Question about forms

    I have a form that i made that is going to be used on a handheld tablet pc in the field for inspecting hydrants. The screen is small so the main form just displays the most commonly used info. What i would like is another form that displays more details such as specific parts of the hydrant and if any repairs need to be done. right now i have created another form based off of the same table just showing the different fields that i want. the problem is, is that that form is not referring to the same record currently open in the original form. it just defaults to the first record in the table. any suggestions on how to get that second form to always open to the same record as the first form, or any suggestions on a better way to do this as i am getting stuck here lol... thanks for your help and sorry if i typed this too confusing.
  • patjones
    Recognized Expert Contributor
    • Jun 2007
    • 931

    #2
    I'm going to assume that you're using DoCmd.OpenForm to open the second form. If that's the case, take a look at the fourth (optional) argument. This allows you to build a WHERE condition into the opening of the form so that the form opens on a record (or set of records) specified by you rather than just the first record.

    Pat

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32662

      #3
      I would consider opening both forms at once, but ensuring the form for the extra details is set invisible upon opening. A button on the main form would set the filter of the second form and then show that form at the same time as hiding itself. There would be a button on the second form that, when you're done looking at the details, would switch back in the same way except it wouldn't touch the filter of the main form.

      Does this sound like it could work well on a hand-held?

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Originally posted by zepphead80
        I'm going to assume that you're using DoCmd.OpenForm to open the second form. If that's the case, take a look at the fourth (optional) argument. This allows you to build a WHERE condition into the opening of the form so that the form opens on a record (or set of records) specified by you rather than just the first record.

        Pat
        Just instantiate form class object and this will give you access to form's instance properties/methods.

        See also this article

        Regards,
        Fish

        Comment

        Working...