This is my first time using Base. Been trying a million things that I found online. No stranger to database coding, just can’t get it to work with Base.
What I have is a very simple form with a few fields on it and a button. When the button is pressed, I need to get the value of the fields on the form. Nothing I have found works.
This seem to be the most comprehensive example I found:
Sub Main
DIM Doc as object
DIM Drawpage as object
DIM Form as object
DIM DateField as object
DIM DateStr as string
DIM PersonField as object
DIM PersonStr as string
Doc = thisComponent
Drawpage = Doc.drawpage
Form = Drawpage.forms.getByName(“Form”)
DateField = Form.getByName(“Date”).getDate()
DateStr = Form.GetByName(“Date”).getCurrentVal()
msgbox(“Date = >” + DateStr + “<”)
PersonField = Form.getByName(“Person”)
PersonStr = PersonField.currentvalue
msgbox(“Person = >” + PersonField.getText() + “<”)
End Sub
No matter what I try to get the value, I get a runtime error that it is unknown. I have tried:
getDate()
getValue()
getValue
getCurrentValue()
getCurrnetValue
Text
getText()
I have seen all of these in various postings. None of them work. If I can get the date to work, I’m sure I can get the rest to work.
Sorry, this is my first post, so not sure if I’m formatting correctly.