Sorry forgot the code
oControl is a date control
the code is
function AppelBase (req as String) as object
dim oContext as object
dim oSource as object
dim oInteractionHandler as object
dim oConnection as object
dim oRequete as object
dim oResultat as object
dim oDate as object
'dim req as string
dim res as string
oContext = createUnoService("com.sun.star.sdb.DatabaseContext")
oSource = oContext.getByName("sav")
oConnection=oSource.getconnection("","")
oRequete = oConnection.createStatement()
oResultat = oRequete.executeQuery(req)
AppelBase=oResultat
End Function
req="SELECT * FROM ""ANNIVERSAIRE"" where ""DATE"">'"+oControl.date"'"
oResult=AppelBase(req)