• How to carry some data into new record? (97, 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to carry some data into new record? (97, 2000)

    Author
    Topic
    #364329

    How can I carry some data from a current record into a new one?
    I have a database which contains information from several accounts.
    When I create a new record from a form, I want the new record to automatically include the same account ID as the record I was working on when I tell the form to create the new record. I know how to do this if the new record is in a subform, but in this case I do not want the information in a subform. It will be a new record in a single form.

    Ideally this would happen regardless of whether the new record was generated using a button I create, or whether it was generated using the navigation buttons at the bottom of the form – but if necessary it could be tied only to the button I create myself.

    This database is currently in 97, but might be upgraded to 2000 at some point.

    Thank you,
    -cynthia

    Viewing 2 reply threads
    Author
    Replies
    • #558938

      I think this article is what you are looking for. It is for Access2000 but it works with Acccess97 as well.

      http://support.microsoft.com/support/kb/ar…RCH&SPR=ACC2000

      hth,
      Jack

    • #558940

      One way to do this is to use global variables and set the values of these on the first form, then on the open event of your new form set the values of the appropriate fields to be the global variable values.

      • #559008

        If you’re working in a form, module level variables are a better option since their scope is limited to the current form and scope should always be set to the minimum required. However, the tag property of each control gives you a handy place to stuff values without declaring and managing a bunch of variables, global or otherwise.

    • #559144

      Thanks for all the replies!
      The info on the microsoft site that you suggest looks like what I need. This project is on the back shelf until this weekend, so I’ll put some more time in on it then and see if I can make it work.
      Thanks again,
      -cynthia

    Viewing 2 reply threads
    Reply To: How to carry some data into new record? (97, 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: