Update linked table

  • Thread starter Thread starter peter.sitskoorn
  • Start date Start date
P

peter.sitskoorn

Hi all,
I have a db with several tables linked to .txt files. On these tables I
run several (mostly select -group by) queries.

If something is changed in the text files, my query does not pick up
the changes made. The table does not automatically pick up the changes.

Is there a way to automatically update the linked tables, on start up
of the db, or with code, so I can use this in a form?

Any help is very much appreciated,

kind regards,
Peter
 
create AuotExec macro

run code in macro: currentdb.tabledef("NAMEOFLINKTABLE").refresh

I think that will do it.
 
Thanks very much, this pointed me into the right direction.
Eventually this is the code that worked:

Dim db As Database
Set db = CurrentDb

Dim tbl1 As TableDef
Set tbl1 = db.TableDefs("GROUP_commis_prem")

tbl1.RefreshLink


Peter
 

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

Back
Top