Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Re: Reset Autonumbers

Discussion in 'Information Technology' started by Jennifer Cali, Jul 28, 2006.

  1. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Kevin, how would you NOT expose the autonumber? I have a two-tab form - on
    the second tab you can click the binoculars beside the item you are looking
    at (it's in datasheet mode) and it will "find" and take you back to the item
    on the first tab. I have the two tabs linked at the parent level via
    autonumber/primary key, so I have to show it. If I take it off the first tab
    the VB code can't FIND the record on the first tab. So...I show it but have
    it uneditable. If you know of a way to make this work without showing it, I
    would be grateful.
    --
    Thank you! - Jennifer


    "Kevin3NF" wrote:

    > My concern here is that you care about the autonumbers at all....are you
    > exposing them to the customer in teh interface?
    >
    > --
    > Kevin Hill
    > President
    > 3NF Consulting
    >
    > www.3nf-inc.com/NewsGroups.htm
    > www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
    >
    > "bdehning" <bdehning@discussions.microsoft.com> wrote in message
    > news:7656B4B6-878A-421F-9D3B-AF08E7BFA5B4@microsoft.com...
    > > Forget my question.
    > >
    > > I was stupid and forgot that you delete all records and then just compact

    > the database. Sorry for the post
    > > --
    > > Brian
    > >
    > >
    > > "bdehning" wrote:
    > >
    > > > I have set up my database with lots of test records over time.
    > > >
    > > > Now I am ready to roll out!
    > > >
    > > > How do I easily reset the record numbers back to 1 for all my table

    > autonumber fields whether joined by relationships or not?
    > > > --
    > > > Brian

    >
    >
    >
     
  2. Loading...

    Similar Threads Forum Date
    World Israeli bedouins fight resettlement plan Breaking News Aug 3, 2013
    Leisure Arcade scores have been reset Business, Lifestyle & Leisure Oct 7, 2005
    Sikh News BJP holds protest against Resettlement Act GK NEWS SERVICE (Greater Kashmir) Breaking News Apr 30, 2005

  3. Larry Daugherty

    Larry Daugherty
    Expand Collapse
    Guest

    You could design a "find" mechanism and algorithm that doesn't require
    exposing the Autonumber to your users. A fairly simple way to do that
    is to use a combobox that will return the Autonumber ID in its first
    column and other identifying information in succeeding columns. Users
    find the identifying information they need and select that row. In
    the AfterUpdate of cboFind, GoToRecord on the desired form Where
    ID=Me!cboFind.

    To keep the ID infusible, give cboFind's first column a width of "0".

    HTH
    --
    -Larry-
    --

    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in
    message news:BBA617CE-A412-4093-8551-4E9C191EBFDB@microsoft.com...
    > Kevin, how would you NOT expose the autonumber? I have a two-tab

    form - on
    > the second tab you can click the binoculars beside the item you are

    looking
    > at (it's in datasheet mode) and it will "find" and take you back to

    the item
    > on the first tab. I have the two tabs linked at the parent level via
    > autonumber/primary key, so I have to show it. If I take it off the

    first tab
    > the VB code can't FIND the record on the first tab. So...I show it

    but have
    > it uneditable. If you know of a way to make this work without

    showing it, I
    > would be grateful.
    > --
    > Thank you! - Jennifer
    >
    >
    > "Kevin3NF" wrote:
    >
    > > My concern here is that you care about the autonumbers at

    all....are you
    > > exposing them to the customer in teh interface?
    > >
    > > --
    > > Kevin Hill
    > > President
    > > 3NF Consulting
    > >
    > > www.3nf-inc.com/NewsGroups.htm
    > > www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area

    DBAs.
    > >
    > > "bdehning" <bdehning@discussions.microsoft.com> wrote in message
    > > news:7656B4B6-878A-421F-9D3B-AF08E7BFA5B4@microsoft.com...
    > > > Forget my question.
    > > >
    > > > I was stupid and forgot that you delete all records and then

    just compact
    > > the database. Sorry for the post
    > > > --
    > > > Brian
    > > >
    > > >
    > > > "bdehning" wrote:
    > > >
    > > > > I have set up my database with lots of test records over time.
    > > > >
    > > > > Now I am ready to roll out!
    > > > >
    > > > > How do I easily reset the record numbers back to 1 for all my

    table
    > > autonumber fields whether joined by relationships or not?
    > > > > --
    > > > > Brian

    > >
    > >
    > >
     
  4. Jennifer Cali

    Jennifer Cali
    Expand Collapse
    Guest

    Thanks, Larry. Is there somewhere I can go to see an example of how this was
    done? I'm not 100% clear on where the combo box would be...is it on the
    second tab or on the main tab? I'm assuming on the second, b/c it sounds like
    that is where the "After Update" would take place. If it updates, what would
    it be tied to on the first tab, as the first tab is where I show the
    autonumber (and where focus is placed) when they click on the binoculars to
    find. The autonumber is actually "hidden" on the second tab b/c I have it
    behind one of the fields they DO use...i.e.: it's on the screen but no one
    can see it as it's not visible due to colors, etc. It's just used to link
    that record (as part of a datasheet) to the parent record on the first tab.
    Hope that's not to confusing.
    --
    Thank you! - Jennifer


    "Larry Daugherty" wrote:

    > You could design a "find" mechanism and algorithm that doesn't require
    > exposing the Autonumber to your users. A fairly simple way to do that
    > is to use a combobox that will return the Autonumber ID in its first
    > column and other identifying information in succeeding columns. Users
    > find the identifying information they need and select that row. In
    > the AfterUpdate of cboFind, GoToRecord on the desired form Where
    > ID=Me!cboFind.
    >
    > To keep the ID infusible, give cboFind's first column a width of "0".
    >
    > HTH
    > --
    > -Larry-
    > --
    >
    > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in
    > message news:BBA617CE-A412-4093-8551-4E9C191EBFDB@microsoft.com...
    > > Kevin, how would you NOT expose the autonumber? I have a two-tab

    > form - on
    > > the second tab you can click the binoculars beside the item you are

    > looking
    > > at (it's in datasheet mode) and it will "find" and take you back to

    > the item
    > > on the first tab. I have the two tabs linked at the parent level via
    > > autonumber/primary key, so I have to show it. If I take it off the

    > first tab
    > > the VB code can't FIND the record on the first tab. So...I show it

    > but have
    > > it uneditable. If you know of a way to make this work without

    > showing it, I
    > > would be grateful.
    > > --
    > > Thank you! - Jennifer
    > >
    > >
    > > "Kevin3NF" wrote:
    > >
    > > > My concern here is that you care about the autonumbers at

    > all....are you
    > > > exposing them to the customer in teh interface?
    > > >
    > > > --
    > > > Kevin Hill
    > > > President
    > > > 3NF Consulting
    > > >
    > > > www.3nf-inc.com/NewsGroups.htm
    > > > www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area

    > DBAs.
    > > >
    > > > "bdehning" <bdehning@discussions.microsoft.com> wrote in message
    > > > news:7656B4B6-878A-421F-9D3B-AF08E7BFA5B4@microsoft.com...
    > > > > Forget my question.
    > > > >
    > > > > I was stupid and forgot that you delete all records and then

    > just compact
    > > > the database. Sorry for the post
    > > > > --
    > > > > Brian
    > > > >
    > > > >
    > > > > "bdehning" wrote:
    > > > >
    > > > > > I have set up my database with lots of test records over time.
    > > > > >
    > > > > > Now I am ready to roll out!
    > > > > >
    > > > > > How do I easily reset the record numbers back to 1 for all my

    > table
    > > > autonumber fields whether joined by relationships or not?
    > > > > > --
    > > > > > Brian
    > > >
    > > >
    > > >

    >
    >
    >
     
  5. Larry Daugherty

    Larry Daugherty
    Expand Collapse
    Guest

    Sorry for the delayed response. I'm often absent from the newsgroups
    for days and weeks at a time.

    The combobox should be able to work just about anywhere.

    To see the code that will be needed, create a blank form for test
    based on the main table you're currently dealing with. With the
    wizards enabled, put a combobox on that form. Tell the wizard you
    want to go to a specific record. The code it will generate is just
    about what you need.

    HTH
    --
    -Larry-
    --

    "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in
    message news:C6C37180-C4A3-497E-B74C-7D43F66D0975@microsoft.com...
    > Thanks, Larry. Is there somewhere I can go to see an example of how

    this was
    > done? I'm not 100% clear on where the combo box would be...is it on

    the
    > second tab or on the main tab? I'm assuming on the second, b/c it

    sounds like
    > that is where the "After Update" would take place. If it updates,

    what would
    > it be tied to on the first tab, as the first tab is where I show the
    > autonumber (and where focus is placed) when they click on the

    binoculars to
    > find. The autonumber is actually "hidden" on the second tab b/c I

    have it
    > behind one of the fields they DO use...i.e.: it's on the screen but

    no one
    > can see it as it's not visible due to colors, etc. It's just used to

    link
    > that record (as part of a datasheet) to the parent record on the

    first tab.
    > Hope that's not to confusing.
    > --
    > Thank you! - Jennifer
    >
    >
    > "Larry Daugherty" wrote:
    >
    > > You could design a "find" mechanism and algorithm that doesn't

    require
    > > exposing the Autonumber to your users. A fairly simple way to do

    that
    > > is to use a combobox that will return the Autonumber ID in its

    first
    > > column and other identifying information in succeeding columns.

    Users
    > > find the identifying information they need and select that row.

    In
    > > the AfterUpdate of cboFind, GoToRecord on the desired form Where
    > > ID=Me!cboFind.
    > >
    > > To keep the ID infusible, give cboFind's first column a width of

    "0".
    > >
    > > HTH
    > > --
    > > -Larry-
    > > --
    > >
    > > "Jennifer Cali" <JenniferCali@discussions.microsoft.com> wrote in
    > > message news:BBA617CE-A412-4093-8551-4E9C191EBFDB@microsoft.com...
    > > > Kevin, how would you NOT expose the autonumber? I have a two-tab

    > > form - on
    > > > the second tab you can click the binoculars beside the item you

    are
    > > looking
    > > > at (it's in datasheet mode) and it will "find" and take you back

    to
    > > the item
    > > > on the first tab. I have the two tabs linked at the parent level

    via
    > > > autonumber/primary key, so I have to show it. If I take it off

    the
    > > first tab
    > > > the VB code can't FIND the record on the first tab. So...I show

    it
    > > but have
    > > > it uneditable. If you know of a way to make this work without

    > > showing it, I
    > > > would be grateful.
    > > > --
    > > > Thank you! - Jennifer
    > > >
    > > >
    > > > "Kevin3NF" wrote:
    > > >
    > > > > My concern here is that you care about the autonumbers at

    > > all....are you
    > > > > exposing them to the customer in teh interface?
    > > > >
    > > > > --
    > > > > Kevin Hill
    > > > > President
    > > > > 3NF Consulting
    > > > >
    > > > > www.3nf-inc.com/NewsGroups.htm
    > > > > www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth

    area
    > > DBAs.
    > > > >
    > > > > "bdehning" <bdehning@discussions.microsoft.com> wrote in

    message
    > > > > news:7656B4B6-878A-421F-9D3B-AF08E7BFA5B4@microsoft.com...
    > > > > > Forget my question.
    > > > > >
    > > > > > I was stupid and forgot that you delete all records and then

    > > just compact
    > > > > the database. Sorry for the post
    > > > > > --
    > > > > > Brian
    > > > > >
    > > > > >
    > > > > > "bdehning" wrote:
    > > > > >
    > > > > > > I have set up my database with lots of test records over

    time.
    > > > > > >
    > > > > > > Now I am ready to roll out!
    > > > > > >
    > > > > > > How do I easily reset the record numbers back to 1 for all

    my
    > > table
    > > > > autonumber fields whether joined by relationships or not?
    > > > > > > --
    > > > > > > Brian
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     

Share This Page