Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Unanswered: Macro to create relationship

    Hi,

    I am still fairly new to access. I am currently working on a project at work involving working with the dataflex db. Since the database is too slow to work directly on with the ODBC driver I use macro commands to import it to a table into access then delete them afterwards.

    Since I will import a few tables in this fashion. I was wondering if there is a way to create relationship between the tables using macros.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    The quick answer is no. You'll need to do it in VBA by using DAO/ADO, in VBA using SQL, or in a Data Definition query.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  3. #3
    Join Date
    Apr 2004
    Posts
    4
    I might have to find another way.

    The only reason why I have to delete the table is because everytime i do an import from an ODBC source to a table say with name "test". If the table existit will create anotehr one name "test1" even when the table is empty. Is there a way not to do this? I just want to import the data not the table.Like transfer spreedsheet macro. But this macro only allows to import data from excel and lotus.

    Can anyone help me?

  4. #4
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    Do you actually need to import the data? Can't you just link to it? If you do need to import the table, why not use the DeleteObject macro action to delete the table called "test" before doing the import? That way you won't get a table called "test1".
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •