Solved

Update previous record 1/3

Posted on 2014-02-08
3
411 Views
Last Modified: 2014-02-09
This is part 1 of a 3-part question; the others are located at
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28360145.html
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28360143.html (yes, I know they're out of order)

In the attached database, which is data retrieved from an ODBC-connected database to which I have read-only access, I can import the data shown in tblOrig. There are hundreds of IDNumbers; this is filtered data for one of them. Essentially, the table from which I am drawing this information lists every IDNumber, and revisions to it are shown in the Revision field, so the unique identifier of each record in the table is IDNumber & Revision.

What I would like to do is change the name of EditDate locally to StartDate, and add a column that says EndDate. I would like to automatically update the EndDate column when a new record is added to the table based on the StartDate; in other words, the preceding record of the filtered data would get an EndDate of the new record's StartDate minus one day.

Part 2 of this question has to do with updating thousands of records in one fell swoop. Part 3 of this question has to do with a way to import the data since the last time I imported it and adding it to this table.

My Access coding skills are... rusty... so any assistance would be greatly appreciated.

Thanks,

ep
efptest01.mdb
0
Comment
Question by:ericpete
3 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 39845021
You can do it with query (in attached sample Query1 is used for calculation of next record and Query2 - for update tblNew)
833371-efptest01.mdb
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 39845078
See my suggestion in 2/3.

/gustav
0
 
LVL 15

Author Closing Comment

by:ericpete
ID: 39845511
Alexey,

Thanks -- does exactly as advertised.

Gustav,

See my comment in part 2.

Regards,

Eric
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now