renumbering access table

hi all,

i am using access with VB. i hv a flexgrid for populating records.here am using 4 fields for a record that are.....sno, appointments, date and time. and i hv 3 buttons in VB add, update(modify) and delete buttons. sometime i use to delete some records in my table using delete stt. at the same i use to call flexroutine to update msflexgrid too.

suppose am deleting 3rd record. that is am deleting record with sno. 3, then there will not be sno. 3 record in table. then sno. series will be 1,2,4,5....

my doubt is how can i make these numbering continous after deleting one or more records. here sno. field not an autonumber field. me only giving the numbering using code.

thanx in advance-------------saj


Comments

  • : hi all,
    :
    : i am using access with VB. i hv a flexgrid for populating records.here am using 4 fields for a record that are.....sno, appointments, date and time. and i hv 3 buttons in VB add, update(modify) and delete buttons. sometime i use to delete some records in my table using delete stt. at the same i use to call flexroutine to update msflexgrid too.
    :
    : suppose am deleting 3rd record. that is am deleting record with sno. 3, then there will not be sno. 3 record in table. then sno. series will be 1,2,4,5....
    :
    : my doubt is how can i make these numbering continous after deleting one or more records. here sno. field not an autonumber field. me only giving the numbering using code.
    :
    : thanx in advance-------------saj
    :
    :
    :
    well, here is a logic problem in progress, if you want to change the number you will cause incorrect results. say for example (i have no idea how your program works, so this is just an example) you have an appointment numbered as 3, i would imagine you would also have a transaction record or something thatg would also have the costs of appointment number 3. if you change this the transaction would then point to an appointment that no longer exists in your database. do not worry about the numbers, as they are probably important to an aspect of your program when they are designed, otherwise you do not need them and they are wasting space. if you do not understand this ( it might be confusing) just try to run the program when you are finished. my guess is you will have errors that are quite very wierd. anyways if you require further assistance email me at [email protected] and i explain further
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion