Results 1 to 3 of 3

Thread: Joining two tables together

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Post

    Dear VB programmers,


    Can someone please tell me the syntax to join two tables:

    In database "C:\Q.MDB"

    Content of Q.MDB:

    Tables Fields
    Cities Street
    Town

    Names Street
    NickName

    Source:

    Dim DBS As Database
    Dim RS As Recordset

    Set DBS = OpenDatabase("c:\q.mdb")
    Set RS = DBS.OpenRecordset("???????????????")

    What do I have to fill in on the quetion marks if I want to join Cities.street with Names.street?

    Nice greetings,

    Michelle.

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    Springfield, IL
    Posts
    124

    Post

    Code:
    Set RS = DBS.OpenRecordset("Select Cities.Street, Cities.Town, Names.NickName FROM Cities, Names WHERE Cities.Street = Names.Street")
    I am not sure if this is what your getting at or not.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Post

    Hello bsmith,

    Yhanks for the quick and usefull answere.

    Nice regards,

    Michelle.

Posting Permissions

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



Click Here to Expand Forum to Full Width