Hi there
i have a problem with this SQL statment
Public Sub dbventasturno()
strNombreDB = "D:\Mi escuela\proyecto extra aula\caja.mdb"
strNombreRS = "venta"
Set DB = DBEngine.OpenDatabase(strNombreDB)
Set RS = DB.OpenRecordset("select foliov & chr(9) & nomp & chr(9) & appp & chr(9) & apmp & chr(9) & sexo & chr(9) & nomM & chr(9) & fechanp & chr(9) & NomS & chr(9) & costo & chr(9) & horaV & chr(9) & billete & chr(9) & cambio & chr(9) & tpv as todo from venta where horav >= " & RS1.Fields("horaL") & " and horav <= " & Time & " ;")
End Sub
the error is here:
where horav >= " & 04:12:10 p.m.& " and horav <= " & Time & " ;")
it says , syntax error (missing operator) on the expresion
horav >= 12:25:15 p.m. and horav <= 04:12:10 p.m. '
its funny to me, cause 12:25:15 p.m. its whats on the DB is and 04:12:10 p.m. is the actual time.
ANYWAY,
the statment i want to make, is to select all the records that have the time between the time that is on an specific record ( RS1.Fields("horaL")) and the actual time (Time)that the Statement is runing.
SOME HELP WOULD BE NICE THANKS PEOPLE!
i have a problem with this SQL statment
Public Sub dbventasturno()
strNombreDB = "D:\Mi escuela\proyecto extra aula\caja.mdb"
strNombreRS = "venta"
Set DB = DBEngine.OpenDatabase(strNombreDB)
Set RS = DB.OpenRecordset("select foliov & chr(9) & nomp & chr(9) & appp & chr(9) & apmp & chr(9) & sexo & chr(9) & nomM & chr(9) & fechanp & chr(9) & NomS & chr(9) & costo & chr(9) & horaV & chr(9) & billete & chr(9) & cambio & chr(9) & tpv as todo from venta where horav >= " & RS1.Fields("horaL") & " and horav <= " & Time & " ;")
End Sub
the error is here:
where horav >= " & 04:12:10 p.m.& " and horav <= " & Time & " ;")
it says , syntax error (missing operator) on the expresion
horav >= 12:25:15 p.m. and horav <= 04:12:10 p.m. '
its funny to me, cause 12:25:15 p.m. its whats on the DB is and 04:12:10 p.m. is the actual time.
ANYWAY,
the statment i want to make, is to select all the records that have the time between the time that is on an specific record ( RS1.Fields("horaL")) and the actual time (Time)that the Statement is runing.
SOME HELP WOULD BE NICE THANKS PEOPLE!