Poobear1929
Technical User
Hi,
I must be making this much harder than what it is, but I am having problems try to write some code to update data in a table through VBA code. Here is what I as trying to do.
I have a process where I Import data from another location. It gets dumped into a temp table, from there is gets further processed and stored in a permanent table. I have a field that holds unique data and that is what I used to make sure I don't import the same record twice in my permanent table. Below is sort of the breakdown of what I am trying to do at the end of my process before I delete the temp table data.
TempTable
PermanentTable
For Each TempTable Record
Where TempTable.uniqueKey = PermanentTable.uniquekey
If TempTable.StartDate <> PermanentTable.StartDate Then
Update PermanentTable.startdate = TempTable.StartDate
Endif
If TempTable.StopDate <> PermanentTable.StopDate then
Update PermanentTable.StopDate = TempTable.StopDate
Endif
I hope this all make sense. Bottom line, some of the data in the temp table holds the current start and stop dates and I need to make sure that gets updated in the Permanent table.
Any help would be great.
Thanks
I must be making this much harder than what it is, but I am having problems try to write some code to update data in a table through VBA code. Here is what I as trying to do.
I have a process where I Import data from another location. It gets dumped into a temp table, from there is gets further processed and stored in a permanent table. I have a field that holds unique data and that is what I used to make sure I don't import the same record twice in my permanent table. Below is sort of the breakdown of what I am trying to do at the end of my process before I delete the temp table data.
TempTable
PermanentTable
For Each TempTable Record
Where TempTable.uniqueKey = PermanentTable.uniquekey
If TempTable.StartDate <> PermanentTable.StartDate Then
Update PermanentTable.startdate = TempTable.StartDate
Endif
If TempTable.StopDate <> PermanentTable.StopDate then
Update PermanentTable.StopDate = TempTable.StopDate
Endif
I hope this all make sense. Bottom line, some of the data in the temp table holds the current start and stop dates and I need to make sure that gets updated in the Permanent table.
Any help would be great.
Thanks