Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help

Status
Not open for further replies.

kidhabj

Programmer
Jun 7, 2005
5
US
I have 2 tables.

one of the tables i am accessing it through a form. However what ever information i put into the first table i want to be able to write that onto to my second table. Using vb code .

Please Help
 
Why storing redundant data ?
What have you tried so far ?
Why a so meaningless subject ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
storing reduntant data for incase delete in table one it should still be in table 2 for backup purposes.

i have tried a relationship between table one and table 2.

i am new at access so really reading a lot of books to answer this question.

Do you know how i can write to a table from a form.

Please help...

Meaningless subject because I have been working on this 9am
 
storing reduntant data for incase delete in table one it should still be in table 2 for backup purposes

Well, are you going to back up your database? If so, you will be protecting the data.

If you are still interested in pursuing this task, then perhaps a compromise...

Instead of copying the data, use a yes/no boolean field in the table design.

tblYourTable
YourPrimaryKey
...
...
Deleted - yes / no
DeletedOnDate - date

Then in your code on disciding what records to display,
If Not Me.Deleted Then...

Or your record source...
SELECT .... WHERE Deleted = False

...to display active records.

Then later, you can really deleted the records by running a Delete Query...

Delete ... Where DeletedOnDate < #YourDeleteDate#

Richard
 
I've always found that having a Yes/No field works really well. Never let a user have any direct access doing anything on your database - do it through a form and prevent delete. When then press a "delete" button they just set a delete field (Yes/No) to yes.

Ensure that all of your queries hide reocrds that have a -1 on the delete field.

Every week, have a DB open via a scheduled task that runs a delete query. All records with a -1 Delete field get physically deleted.

Also, have a daily backup on a weekly tape cycle.

Cheers,



Steve.

"They have the internet on computers now!" - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top