Preventing duplicate updates

G

Guest

I have a system that allows reporting from imported data. I keep a track of
what has been imported via a table called tblImportLog. The data itself goes
into tblImportData - this table has no possible unique key.
When a report is requested, I look in the log to see if the needed data has
been imported,
if not, it gets imported.
This is the theory....
But what is happening is that sometimes the data gets imported twice. I have
looked at the code and cannot for the life of me figure out what is happening.
This does not happen every time - only sometimes.
I use a DLOOKUP on the record in the tblImportLog to determine if the data
has been imported. If the dlookup fails, I am even doing a failsafe check by
checking the actual data table and if I find data in there I issue a Msgbox
indicating the log is out of sync with the data.
It seems that maybe the DLOOKUP is returning NULL even though there is a
record there - this is the only reason I can think of.

Any ideas?
 
G

Guest

Use all of the fields of your table called tblImportLog for a index key.
In design view highlight all of the fields and click on the key icon and save.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top