Results 1 to 2 of 2

Thread: New Record

  1. #1
    Join Date
    May 2003
    Posts
    4

    Unanswered: New Record

    I have a table that uses a query to automatically increment the number in next_number column by 1 everytime it is run.
    I have another table that I wish to place this new value in when a new record is added.

    Table 1 associated to the query does not have a primary key and is simply used to store the next_number, a new record is not inserted each time. It is not linked to Table 2, which contains actual record information.

    Prob: How do I pull the next_number value from Table 1 and place into the appropriate column in Table 2 (ie. autonumber2) when a new record is inserted? Table 2 has already got an autonumber as the primary key.

    Like autonumber, but I use table 1 to increment based on active = true, as each new year the value gets set back to 1. (ie. in 2004, 2003 will not be active and 2004 will begin at 1 and be set to active).

    Does this make sense?
    Any Suggestions?

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: New Record

    Originally posted by MLS
    I have a table that uses a query to automatically increment the number in next_number column by 1 everytime it is run.
    I have another table that I wish to place this new value in when a new record is added.

    Table 1 associated to the query does not have a primary key and is simply used to store the next_number, a new record is not inserted each time. It is not linked to Table 2, which contains actual record information.

    Prob: How do I pull the next_number value from Table 1 and place into the appropriate column in Table 2 (ie. autonumber2) when a new record is inserted? Table 2 has already got an autonumber as the primary key.

    Like autonumber, but I use table 1 to increment based on active = true, as each new year the value gets set back to 1. (ie. in 2004, 2003 will not be active and 2004 will begin at 1 and be set to active).

    Does this make sense?
    Any Suggestions?
    how do you add new records (by runnnign a query or a form?) if by a query, how does it look like?

    its possible to add the newly-created number into table2 if you add records to table1 by a form
    qha_vn

Posting Permissions

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