LO 7.1.2 HSQL 2.51 win10
Hi,
Struggling with a date check
How can I check for a null value of a date field of an existing record. Tried to adapt this code which works
Sub checkblanks
DIM oDoc AS OBJECT
DIM oDrawpage AS OBJECT
DIM oForm AS OBJECT
DIM oTable AS OBJECT
DIM oGrid AS OBJECT
DIM oColumnis AS OBJECT
DIM myid AS STRING
oDoc = thisComponent
oDrawpage = oDoc.drawpage
oForm = oDrawpage.forms.categoria.subcategoria.getByName(“subItem”)
oTable = oForm.getByName(“subBookings”)
oGrid = oTable.getByName(“tc1”)
oColumnis = oGrid.getByName(“bnos”)
myid = oColumnis.getCurrentValue()
MSGBOX "the value is " + myid
If myid <-1 Then
MSGBOX “noid”
EXIT Sub
endif
to this - but the null does not throw an error and still opens the report
oForm = oDrawpage.forms.categoria.subcategoria.getByName(“subItem”)
oTable = oForm.getByName(“subBookings”)
oGrid = oTable.getByName(“tc1”)
oColumnis = oGrid.getByName(“idate”)
mydt= oColumnis.getCurrentValue()
MSGBOX "the value is " + myid
If mydt = Null Then
MSGBOX “nodate”
EXIT Sub
endif
call OpenFactura
End Sub
appreciate any pointers, thanks