Delete button

  • Thread starter tspies85 via AccessMonster.com
  • Start date
T

tspies85 via AccessMonster.com

Hi,
i am creating an inventory system. I have a problem in my delete item form.
I hope when i click the delete item button ( which means that item doesn't
exist anymore in the office ) ,the details about that item doesn't appear in
the form anymore. But my bos, wanted me to save the records in other tables
so it would be easier for later use. Right now i don't know how to duplicate
the records, so it can be transfer to the new table called deleteItem.
 
R

Rod Plastow

Hi,

A conventional way of handling this requirement is to include a status
attribute for inventory items. The status could perhaps take the following
values: "Active", "Obsolete", "Deleted." You may also want to include a
status date so you know the last time a status changed. In this way you
don't need to move your data; simply include a WHERE Status <> 'Deleted' in
any SQL where you don't want to retrieve deleted items. The benefit of this
approach is that you don't need to reprogram when the structure of the
inventory item table changes.

I would strongly encourage you not to think of tables as reflecting the way
in which you want to present your data or the way in which you think about
your data, this should be done by Views (or in Access terminology, Queries).
Tables should be designed and organized according to the dictates of the data
itself - at least this is true for relational databases of which Access is
one. (I have one project where something the user thinks of as one simple
piece of information is in fact a composite of data retrieved from four
separate tables.)

Having said all that if you still wish to move a deleted record to another
table then you need to code this mechanism in VBA. I know of no macro
imaging function to do this for you. The design of both tables should be the
same and you need to tediously move the data column by column.

Regards,

Rod
 
T

tspies85 via AccessMonster.com

Hi Rod,

Thank you for your suggestion and very usefull information. I'll try to
create that attribute status.If i have any problems occur, i'll email you
later.ok.

Rod said:
Hi,

A conventional way of handling this requirement is to include a status
attribute for inventory items. The status could perhaps take the following
values: "Active", "Obsolete", "Deleted." You may also want to include a
status date so you know the last time a status changed. In this way you
don't need to move your data; simply include a WHERE Status <> 'Deleted' in
any SQL where you don't want to retrieve deleted items. The benefit of this
approach is that you don't need to reprogram when the structure of the
inventory item table changes.

I would strongly encourage you not to think of tables as reflecting the way
in which you want to present your data or the way in which you think about
your data, this should be done by Views (or in Access terminology, Queries).
Tables should be designed and organized according to the dictates of the data
itself - at least this is true for relational databases of which Access is
one. (I have one project where something the user thinks of as one simple
piece of information is in fact a composite of data retrieved from four
separate tables.)

Having said all that if you still wish to move a deleted record to another
table then you need to code this mechanism in VBA. I know of no macro
imaging function to do this for you. The design of both tables should be the
same and you need to tediously move the data column by column.

Regards,

Rod
Hi,
i am creating an inventory system. I have a problem in my delete item form.
[quoted text clipped - 3 lines]
so it would be easier for later use. Right now i don't know how to duplicate
the records, so it can be transfer to the new table called deleteItem.
 
R

Rod Plastow

If this is a second post, apologies. The interface is playing up.

Email: [email protected]


tspies85 via AccessMonster.com said:
Hi Rod,

Thank you for your suggestion and very usefull information. I'll try to
create that attribute status.If i have any problems occur, i'll email you
later.ok.

Rod said:
Hi,

A conventional way of handling this requirement is to include a status
attribute for inventory items. The status could perhaps take the following
values: "Active", "Obsolete", "Deleted." You may also want to include a
status date so you know the last time a status changed. In this way you
don't need to move your data; simply include a WHERE Status <> 'Deleted' in
any SQL where you don't want to retrieve deleted items. The benefit of this
approach is that you don't need to reprogram when the structure of the
inventory item table changes.

I would strongly encourage you not to think of tables as reflecting the way
in which you want to present your data or the way in which you think about
your data, this should be done by Views (or in Access terminology, Queries).
Tables should be designed and organized according to the dictates of the data
itself - at least this is true for relational databases of which Access is
one. (I have one project where something the user thinks of as one simple
piece of information is in fact a composite of data retrieved from four
separate tables.)

Having said all that if you still wish to move a deleted record to another
table then you need to code this mechanism in VBA. I know of no macro
imaging function to do this for you. The design of both tables should be the
same and you need to tediously move the data column by column.

Regards,

Rod
Hi,
i am creating an inventory system. I have a problem in my delete item form.
[quoted text clipped - 3 lines]
so it would be easier for later use. Right now i don't know how to duplicate
the records, so it can be transfer to the new table called deleteItem.
 
Top