I Create an access 97 db with a table named students and connect it with a vb6 form using data control
when i search for the recored between two numbers( the caqlculation of 3 subjects exam) i get a run time error '3061' when execute the code below
can any one you help me in this case

Private Sub Command1_Click()

Dim x As Double
Dim y As Double

x = InputBox(" Enter First Number")
y = InputBox(" Enter SecondNumber")


Data1.RecordSource = "SELECT * From students WHERE sub1+sub2+sub3 > x And sub1 + sub2 + sub3 < y "
Data1.Refresh


End Sub