Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Maine, USA
    Posts
    258
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

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

    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q210/2/36.ASP?LN=EN-US&SD=gn&FR=0&qry=q210236&rnk=1&src=DHCS_MSPSS_gn_ SRCH&SPR=ACC2000>http://support.microsoft.com/support/kb/ar...RCH&SPR=ACC2000</A>

    hth,
    Jack

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    Wirral, Merseyside, Merseyside, England
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

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

    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.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Maine, USA
    Posts
    258
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

Posting Permissions

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