Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

Tracking down problems in your code can be a bear, especially when it complex and handling multiple situations.

For example, today I was trouble shooting an import file that was not importing properly. I’ve so far tracked it down to the logic that determines whether previous files have overlapping date ranges in them. The logic can be very tricky because I have to track it by individual part numbers for each file, meaning I’m checking minimum and maximum dates for particular part numbers in other files and finding newer ranges than the imported file to make sure I’m not overwriting newer data.

Of course, many assumptions are being made about this, for example, that the date ranges being imported are actually sent in the order from oldest to newest and that newer data should be kept and older data should be overwritten.

Sometimes these assumptions are wrong, but this time that wasn’t the case, my assumption wasn’t wrong, I just used global file dates in the file headers of the other files as shortcuts. But in order to compare for particular parts, I’m changing the ranges. Ultimately, this worked at the time to fix another problem, but it is creating a new problem here.

In order to fix it, I’m going to have to find a way to track and store the part number minimum and maximum dates for each file instead of the global dates so I can do a proper comparison. Looks like I’ll be adding a new table to store that information and I can work against that. This will preveent a number more potential problems down the road.

At the same time I keep archiving data older than 6 months in order to keep Access file sizes below 1Gb which starts creating issues for the system which is still running on Access 32 bit.