I am trying to have a button on a form set values into a text box using this code:
Code: Select all
Sub DoDate
oController = ThisComponent.CurrentController
oForm = ThisComponent.drawpage.forms.GetByName("MainForm")
cControl = oForm.GetByName("DateBox")
oControlView = oController.GetControl(cControl)
oControlView.SetFocus 'sets the focus
oControlView.Text = format(DATE,"YYYY-MM-DD")
End Sub
Thank you very much for any help.