Hi! I am designing an Access 2003 database that includes movement_header (master) and movement_detail (detail) tables. The primary key for the master table is movement_id, type autoincrement; this related to the foreign key movement_detail.movement_id.
In the movement_detail table, I would like to have a detail_id field that always begins at 1 and autoincrements to 2,3, etc. So if I have movement_id equal, say, 2000, with three detail records, I would like to have detail_id values of 1,2 and 3.
I currently have this defined as type autoincrement, but I find that it does not start at 1; instead, it starts at one number higher than the latest detail_id for ANY movement_id. So with limited testing now, my detail_id might start at 30 and increment to 31 and 32.
Is there a way I can implement this so that the detail_id always starts at 1 and increments by one for each new detail record? Thanks in advance for any input you can offer.
In the movement_detail table, I would like to have a detail_id field that always begins at 1 and autoincrements to 2,3, etc. So if I have movement_id equal, say, 2000, with three detail records, I would like to have detail_id values of 1,2 and 3.
I currently have this defined as type autoincrement, but I find that it does not start at 1; instead, it starts at one number higher than the latest detail_id for ANY movement_id. So with limited testing now, my detail_id might start at 30 and increment to 31 and 32.
Is there a way I can implement this so that the detail_id always starts at 1 and increments by one for each new detail record? Thanks in advance for any input you can offer.