-
Being a slow-witted newbie, I have been painfully attempting to string together my first app, and thanks especially to the ubiquitous Preeti and the web-based tutorials of Dale Shaw and Karl Moore it has been coming along nicely. However, I have some problems with syntax and I am pretty clueless. I think I'm at the point where I know what I'm doing and I just don't know exactly how to express it. If anybody could tell me what's wrong with the following code, I'd appreciate it.
TIA,
Jonathan
SQL$ = "SELECT * FROM " & strTable
SQL$ = SQL$ & " WHERE " & strFindBy
SQL$ = SQL$ & " = " & strMatchWith
SearchSQL = SQL$
Dim db As Database
Set db = OpenDatabase(There is a database directory here, but for company security reasons I can't post it)
Set Adodc1.Recordset = db.OpenRecordset(SearchSQL)
MSHFlexGrid1.Visible = True
End Sub
------------------
"Black?"
"For over thirty years."
-
What is the value for strMatchWith ??? According to naming convention - its a string....then you're missing single quotes:
SQL$ = "SELECT * FROM " & strTable
SQL$ = SQL$ & " WHERE " & strFindBy
SQL$ = SQL$ & " = '" & strMatchWith & "'"
SearchSQL = SQL$
Reagrds,
------------------
Serge
Software Developer
[email protected]
[email protected]
-
Thank you, Serge. The SQL is not giving me trouble anymore. As for the ADO control... rrrrrrr.
Thanks,
Jonathan