That thread read the field. I am looking to set the field to the current date when the form loads now. The below runs on form load, but the oDateField.setValue(today) line throws an error.
Sub OpenFormNewJobLabour()
'msgbox "ADD NEW ITEM"
Dim oForm As Object
Dim oField As Object
Dim oDateField As Object
Dim today As New com.sun.star.util.Date
today.Month = Month( Now )
today.Day = Day( Now )
today.Year = Year( Now )
'Set Job Field
If iJobID = 0 Then Exit Sub
oForm = ThisComponent.Drawpage.Forms.getByName("Job_Add_Labour")
oField = oForm.getByName("Job_No") 'Get access to field'
oField.Text = iJobId 'Move in value'
iJobID = 0
'Set date field to current
oDateField = oForm.getByName("Labour_Date") 'Get access to field'
oDateField.setValue(today)
End Sub