
HELP PLEASE!!! ACCESS AND VB
Firstly thanks to all the people who have helpled me out in this NG before.
I am currently trying to join 4 tables an getting them to show in one form.
Here is what i have coded.
Private Sub form_load()
'define database and recordset
Dim qryclass As String
Dim qdfclass As QueryDef
'Define the query string, the querydef, and the recordsets in code.
qryclass = "select * from tblTeacher, tblClass, tblVenue, tblCourse"
qryclass = qryclass + " Where tblClass.courseid = tblCourse.courseid and
tblClass.venuecode = tblVenue.venuecode and tblClass.Teacherid =
tblTeacher.Teacherid"
Set qdfclass = dbBrimbank.CreateQueryDef("", qryclass)
Set rstClass = qdfclass.OpenRecordset(dbOpenDynaset, dbInconsistent)
Displaydata
End Sub
with this code I get an error saying
"RUN TIME ERROR '3615'"
TYPE MISMATCH IN JOIN EXPRESSION
When I try and join 3 tables using this code i have no problems. I only have
troubles when i try and join 4.
ARHGHHHHH HELP
Thanks in advance.