G
Guest
Hi
I hope I can explain this clearly.
I have a DB that records details of properties. A master table
(tbl_SRMASTER) records the Portfolio certificate (PK = SRIDX) and a secondary
table (tbl_SRDETAILS) records the detailed information regarding each
property within that portfolio (double PK = SRIDX & SRLINE). One portfolio
can have a number of properties.
I have set up a form - tbl_SRMASTER is behind the main form and
tbl_SRDETAILS becomes the subform. The form would look something like this:
SRIDX = SR001 (on master form)
(Detail on subform)
SRLINE Property
1 House #1
2 House #2
3 Office #1
4 Office #2
etc.
Okay, after all that, my query is this: If I delete a line, I want the
number in the next line to replace the line that I deleted, ie. if using the
example data above, I deleted Line 2, I want the data to look like this:
SRLINE Property
1 House #1
2 Office #1
3 Office #2
At the moment if I delete a line, I have to manually renumber each line
after that deleted one to get a sequential list, and that is not feasible,
and obviously I would want to automate this, if possible.
I thought about using DMax, but that wouldn't work because tbl_SRDETAILS
would store a number of the same SRLINEs depending on the SRIDX. SRLINE is
used mainly as a sorting mechanism for each property.
Can someone help me with this? Or is there another way entirely to do
this????
Thanks in advance
Winsa
I hope I can explain this clearly.
I have a DB that records details of properties. A master table
(tbl_SRMASTER) records the Portfolio certificate (PK = SRIDX) and a secondary
table (tbl_SRDETAILS) records the detailed information regarding each
property within that portfolio (double PK = SRIDX & SRLINE). One portfolio
can have a number of properties.
I have set up a form - tbl_SRMASTER is behind the main form and
tbl_SRDETAILS becomes the subform. The form would look something like this:
SRIDX = SR001 (on master form)
(Detail on subform)
SRLINE Property
1 House #1
2 House #2
3 Office #1
4 Office #2
etc.
Okay, after all that, my query is this: If I delete a line, I want the
number in the next line to replace the line that I deleted, ie. if using the
example data above, I deleted Line 2, I want the data to look like this:
SRLINE Property
1 House #1
2 Office #1
3 Office #2
At the moment if I delete a line, I have to manually renumber each line
after that deleted one to get a sequential list, and that is not feasible,
and obviously I would want to automate this, if possible.
I thought about using DMax, but that wouldn't work because tbl_SRDETAILS
would store a number of the same SRLINEs depending on the SRIDX. SRLINE is
used mainly as a sorting mechanism for each property.
Can someone help me with this? Or is there another way entirely to do
this????
Thanks in advance
Winsa