Using import file, Update Fields within a Table

  • Thread starter Thread starter AJOLSON
  • Start date Start date
A

AJOLSON

I want to import data from a txt file and update fields within a table. More
specifically what I am looking to do is have the txt file open then evaluate
each record within a table to match a unique identifier. When the match is
made I want the “Empty (null)†fields within that file to be updated and
those fields that are not null to be ignored. Is this at all possible? And
if so does anyone have the code that will help me execute this.
 
I want to import data from a txt file and update fields within a table. More
specifically what I am looking to do is have the txt file open then evaluate
each record within a table to match a unique identifier. When the match is
made I want the "Empty (null)" fields within that file to be updated and
those fields that are not null to be ignored. Is this at all possible? And
if so does anyone have the code that will help me execute this.

Yes, it's possible but it's pretty hard for someone to write your code
for you with out a lot more information. You should start by looking
up DoCmd.TransferText, you want to import your text file into a temp
table then create an update query matching your unique identifier in
the temp table to the table you wish to update and setting the
criteria in the fields you wish to update to NOT NULL so it will only
update them if the field is null then run the query.

Hope that helps
Rick
 
setting the
criteria in the fields you wish to update to NOT NULL so it will only
update them if the field is null then run the query.

Hope that helps
Rick

Sorry,
Got in a hurry, you should set the criteria to Null so it only updates
the null fields.
 
Back
Top