Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

Appending and Deleting Data using Modules

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
geek - 26 Sep 2005 11:25 GMT
i'm currently doing a fixed asset db, extracting the data from the SQL
server. as the depreciation for the fixed assets changes every month, i would
like to store the previous months of the fixed assets in a table. every
month, the user would press the update button on the form to update the
current month's depreciation data. however, i do not want duplicate data for
the current month should the user press the update button twice.

how do i get the modules to overwrite the current month's data without
deleting the data for the previous month?
SteveD - 28 Sep 2005 01:19 GMT
Here's a version for you to try.

Assumption: In the SQL data there are field(s) that have the year and month
(Year/Month), which you also have in the table the data is going to.

Assumption: Your form has a field(s) that the user enters the year/month

When the user clicks the button - you query your table for the year/month to
determine if this year/month already exists.  If NO - then append the new
records. If YES, there are records already - then give the user a warning
message and the option to "redo" the process.  If they want the "redo", then
delete these records in your table for the Year/Month and append the new data.

Hopefully this gives yu something to think about.  If you need more help -
ask.

SteveD

> i'm currently doing a fixed asset db, extracting the data from the SQL
> server. as the depreciation for the fixed assets changes every month, i would
[quoted text clipped - 5 lines]
> how do i get the modules to overwrite the current month's data without
> deleting the data for the previous month?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.