how do i open a linked table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kwokv616
    New Member
    • Nov 2008
    • 13

    how do i open a linked table?

    If a table is imported into the database, we write:
    Dim rst_p, rst_r As DAO.Recordset
    Set db = CurrentDb
    Set rst_p = db.OpenRecordse t("Pol", dbOpenTable)
    Set rst_r = db.OpenRecordse t("Rid", dbOpenTable)
    But if the tables are linked instead, what code should i write to open it?

    Thank you very much!
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    The code doesn't change at all.

    Comment

    • MikeTheBike
      Recognized Expert Contributor
      • Jun 2007
      • 640

      #3
      Originally posted by kwokv616
      If a table is imported into the database, we write:
      Dim rst_p, rst_r As DAO.Recordset
      Set db = CurrentDb
      Set rst_p = db.OpenRecordse t("Pol", dbOpenTable)
      Set rst_r = db.OpenRecordse t("Rid", dbOpenTable)
      But if the tables are linked instead, what code should i write to open it?

      Thank you very much!
      Hi

      I find that if you omit the dbOpenTable 'Type' argument then it works OK, In fact only 3 of the 5 'Type' arguments seem to work with a link table name.

      I cannot comment further as I only use ADO recordset (at least for the last 8 years!).


      MTB

      Comment

      Working...