Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Database Design

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-01-2010, 05:09 AM
Stressed Stressed is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Mar 2010
Posts: 19
Stressed is on a distinguished road
Default Managing Point in Time

Good morning all,

I have been trying to figure this out all weekend.

Let me start off by saying that I by no means a programmer. I can fumble my way through most VBA using the web or bouncing ideas off others.

I have a situation now where I need to be able to historically change data without physically updating the existing records "important".

Right now, I have three cases

1. the new effective date is = to the existing effective date - ACTION: update the existing record with a replace timestamp; insert a new record with the new information with the same effective date

2. the new effective date is > the existing effective date - ACTION: insert a copy of the existing row with an end date one day less then the new effective date; update the existing row with a replace timestamp; insert a new row with the new information (effective date one day > than the end date.

3. This is where my issue is... the new effective date < the existing effective date. When there is only one record, this isn't an issue. I can just follow case 1 but when there is more then one record then there is a problem. I can not have 2 or more records "effective" in the same time period.

I need to find a solution that will enable me to search for existing records where the new record will be in between and then update each row in succession accordingly.

I hope that I have written out my issue properly.

Any help, pointers, links to other solutions would make my day!

Thanks for reading!

Stressed
Reply With Quote
  #2  
Old 03-09-2010, 04:55 AM
Stressed Stressed is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Mar 2010
Posts: 19
Stressed is on a distinguished road
Default Solved

I figured it out.

Steps:

1. Find record where the new effective date is between the old effective date and end date

2. Copy that row.

3. Logically delete that row

4. Change the end date to one day less than the new effective date

5. Logically delete all records where the new effective date is > the current effective date.

6. Insert the new record with the new effective date.

Complicated process but I end up with all the history that the user makes in real time.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Query kbsudhir Queries 1 07-06-2009 03:19 AM
Displaying Time Only Corinne Access 5 06-24-2009 07:45 PM
Time Comparison Larry819 Queries 1 06-22-2009 07:26 PM
Time bertenbert Queries 1 08-04-2008 01:05 AM
Point of Sales Application chico_yallin Access 1 06-23-2007 03:30 AM


All times are GMT -8. The time now is 08:29 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.