If I execute print oForm.GetByName(“PATIENT_FDN”).Text - I get a blank for the date which is not correct.
I can read the individual elements OK … and they are correct - e.g. 13, 04, 2006
This one app has over 35 forms, most of which need to check a date entered by the user.
I’ve made a simple form with one date field on it and a button to execute the following macro:
Sub Main
Dim Form as Object, dobs as string
Form = ThisComponent.DrawPage.Forms.getByName("Form")
print Form.getbyName("Date1").Text
print Form.getbyName("Date1").Date.Month
print Form.getbyName("Date1").Date.Day
print Form.getbyName("Date1").Date.year
End Sub
The output is blank for the statement, and the correct values for the rest…
I can’t see how to upload the simple form to this thread, but I could email it or ???