Hi my names Mick,can somebody help me.
Dim strQuery As String
strQuery = "SELECT * FROM ScoresTable WHERE Handicap <= 16"
Adodc1.RecordSource = strQuery
Adodc1.Refresh
Dim strQuery As Variant
strQuery = "SELECT * FROM ScoresTable WHERE CourseName = Hertfordshire"
Adodc1.RecordSource = strQuery
Adodc1.Refresh
Why does the first query get the result i want,the second one i get a message saying "No value given for one or more parameters"
thanks
Comments
like
strQuery = "SELECT * FROM ScoresTable WHERE CourseName ='Hertfordshire'"
Or use Parameters, then you will make your query safer and also protected against '' issues like this.
Tore Nestenius
[blue][italic][b]/WEBMASTER[/b][/italic][/blue] Programmers Heaven