Can this be done in Access?

  • Thread starter Thread starter TotallyConfused
  • Start date Start date
T

TotallyConfused

I have a flat file that I need to import into Access database with about 25+
fields. In my database, I have 6 tables that need to be updated with the
data from the flat file. Can this be done automatically? If so how can I do
this without too much coding. (I am not good with coding) Any help will be
greatly appreciated. Thank you.
 
TotallyConfused said:
I have a flat file that I need to import into Access database with about
25+
fields. In my database, I have 6 tables that need to be updated with the
data from the flat file. Can this be done automatically? If so how can I
do
this without too much coding. (I am not good with coding) Any help will
be
greatly appreciated. Thank you.

Yes is certainly can be done, however you'll have to explain a little bit
more in details how you need to update those six tables. Are you attempting
to append records to those tables, or are you attempting to update
particular data?

I would import the table, and then use the query builder to build the
updates you need.

once you built the update queries (the query builder can often help you
here. then, you start automate the import and have your code execute the
"update" quires.

So, start with a manual import. Then build quires. Once you have all the
steps working, then you can start writing code to execute the whole process
as a one step affair.

If the imported table was a part number + a new price, then a update query
could be BUILT AS follows.

Drop in the table you want to update

Drop in the imported table.

Drag the price field into the query grid.

draw a join line on the key value (in this case partnum) between the two
tables.

Now from the menu change the query from a select to a update query. In the
update to value, type in the name of the price field from the imported
table.

tablename.NewPrice

If you run this query, then you updating rows in the table from the imported
data.

For any testing and update stuff, if you new to this, then work on a copy
until this works the way it should....

You can also type in a query in sql view also. the above query would look
like:

UPDATE tblParts INNER JOIN tblNewPartPrice ON tblParts.PartNum =
tblNewPartPrice.PartNum
SET tblParts.PartPrice = tblNewPartPrice.PartPrice

So, you can "join" on a common field on the imported table, and that will
enable you update your existing tables.
 
Back
Top