PDA

Click to See Complete Forum and Search --> : Joining two tables together


michelle
Mar 7th, 2000, 08:34 PM
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.

bsmith
Mar 7th, 2000, 08:39 PM
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.

michelle
Mar 7th, 2000, 08:51 PM
Hello bsmith,

Yhanks for the quick and usefull answere.

Nice regards,

Michelle.