Hi All,
I have encountered an annoying problem. I've read through all the post concerning this error. But yet, I still can't seem to solve the problem. When I run the program, it pops out this annoying error stating Run-time error '3131'. Syntax error in FROM clause. I've also read through salman1karim's post, and added spaces after and before a new line like told. And yet, it can't seem to solve the problem... Can anyone please help me? I'm very new to VB so, I might miss out something obvious...
Code:
Thank you very much...
I have encountered an annoying problem. I've read through all the post concerning this error. But yet, I still can't seem to solve the problem. When I run the program, it pops out this annoying error stating Run-time error '3131'. Syntax error in FROM clause. I've also read through salman1karim's post, and added spaces after and before a new line like told. And yet, it can't seem to solve the problem... Can anyone please help me? I'm very new to VB so, I might miss out something obvious...
Code:
Code:
Private Sub txtSearch_Change()
If txtSearch.Text = vbNullString Then
Set rstSearch = dbsNormah.OpenRecordset("Children General Record", dbOpenTable)
Else
Set rstSearch = dbsNormah.OpenRecordset("Select * from Children General Record where Full Name = '" & txtSearch.Text & "' " & " & '*'")
End If
list
End Sub
Private Sub lstdata_Click()
Set rstSearch = dbsNormah.OpenRecordset("Select * from Children General Record where full name = '" & Trim(lstdata.list(lstdata.ListIndex)) & "'")
rstSearch.MoveFirst
LblFullNameR.Caption = rstSearch("Full Name")
LblSurnameR.Caption = rstSearch("Surname")
LblICR.Caption = rstSearch("Identification")
LblTelR.Caption = rstSearch("Tel No")
LblSchoolR.Caption = rstSearch("School")
LblIDR.Caption = rstSearch("Patient ID")
Comment