Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    Unanswered: relation-problem

    My problem ist that I cannot make a relation

    here is my sourcecode:

    Sub makerelations(dbs As DAO.Database)
    Dim rel As Relation
    Dim f As Field

    Set rel = dbs.CreateRelation("test_rel", "t_adresse", "t_kunde", dbRelationLeft)

    Set f = rel.CreateField("adr_id")
    f.ForeignName = "adr_nr"
    rel.Fields.Append f
    dbs.Relations.Append rel

    End Sub


    does not run !!!
    cannot find ForeignName and some typerrors

    The question is.
    These are 2 linked Tables
    How can I make a Relation between them with the easiest method?????
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  2. #2
    Join Date
    Mar 2003
    Location
    London
    Posts
    40

    Re: relation-problem

    Do you have to do it through code?

    If not, go to Tools->Relationships and establish relationships there.

  3. #3
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    code

    I must do this with code

    My problem is this is a frontend and It should connect to several ODBC-Databases with the same structure

    I've tried it to link it static but access remembers the ODBC-Connection and I had no chance to switch to another odbc connection

    So I must generate the linked tables new if I want to connect me to a new ODBC -Database
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

Posting Permissions

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