G
Guest
I am looking for some advice/opinions on the best course of action for some
code that I have been working on. I have programmed before, but I have been
attempting to teach myself Access/VBA as I go along. After reading through
some of these discussion threads, I am starting to think that there may be a
better way than the brute force approach that I have been struggling with.
I am importing data from a text file into a temporary table. This data
however, may have a field that contains duplicate data. I need to remove the
corresponding duplicate record(s) can be removed. After this
data-simplification has occured, I then need to append the newly imported
data from the temp table into the actual table that I am storing my valid
data in. Another caveat - there is a date/time field that all data is sorted
by; the imported data will always overlap and supersede this date/time value
of the old data by some amount. The "old" records of the existing table must
be deleted and replaced by the newer, more current imported data.
Any suggestions on how to efficently do this? Right now I have a very ugly
nested-loop churning through the records so that I can compare
Current-to-Previous-to-Next records. It seems long-winded and system
consuming. With all the bits and pieces that I am picking up through this
discussion board and the help file, my gut is starting to tell me that this
is getting to be a lot uglier than it needs to be.
Thanks in advance, and please respond to this discussion thread - network
security prevents access to this email at work.
code that I have been working on. I have programmed before, but I have been
attempting to teach myself Access/VBA as I go along. After reading through
some of these discussion threads, I am starting to think that there may be a
better way than the brute force approach that I have been struggling with.
I am importing data from a text file into a temporary table. This data
however, may have a field that contains duplicate data. I need to remove the
corresponding duplicate record(s) can be removed. After this
data-simplification has occured, I then need to append the newly imported
data from the temp table into the actual table that I am storing my valid
data in. Another caveat - there is a date/time field that all data is sorted
by; the imported data will always overlap and supersede this date/time value
of the old data by some amount. The "old" records of the existing table must
be deleted and replaced by the newer, more current imported data.
Any suggestions on how to efficently do this? Right now I have a very ugly
nested-loop churning through the records so that I can compare
Current-to-Previous-to-Next records. It seems long-winded and system
consuming. With all the bits and pieces that I am picking up through this
discussion board and the help file, my gut is starting to tell me that this
is getting to be a lot uglier than it needs to be.
Thanks in advance, and please respond to this discussion thread - network
security prevents access to this email at work.