Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21088

Syntax error in query expression

$
0
0
I'm having trouble with using query in access. My teacher just gave a code and I don't know much about those.. I input those in my visual basic and error occur.

this is the code.

Code:

Private Sub lgin_Click()


Set rs = New ADODB.Recordset
sql = "SELECT STUDREC.stid, tblmem.dte_valid, STUDREC.Lname, tblacnt.role" & _
    "FROM STUDREC,tblacnt,tblmem,tblrle" & _
    "where tblacnt.userid = tblrle.userid And" & _
    "tblacnt.userid = tblmem.userid And" & _
    "tblacnt.uname ='" + Text1.Text & "' And tblacnt.pword ='" + Text2.Text + "'"


With rs
.CursorLocation = adUseClient
.Open sql, con, adOpenStatic, adLockOptimistic
End With



End Sub

anyone might know how to solve this? thank you :)

Viewing all articles
Browse latest Browse all 21088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>