I’ve made a macro to get information about the user to autofill two fields, name and last name. It works and display the information in the fields. In my form, they are both linked a field in the database. My issue is that when I save my form, the data written in those two fields doesn’t stock in the database. Do I have to make something special in my macro to let the form know that the field isn’t actually empty ?
This is the macro
Sub getMotherFirstName
Dim oFormDocs,oCallFormDoc,oForm,oComponent as object
Dim valueData As String
oForm =thisComponent.Parent.FormDocuments
rem ThisComponent.Drawpage.Forms.getByName("Form").getByName("Boxtest").Text = "hey you "
rem valueData = ThisComponent.Drawpage.Forms.getByName("HomeForm").getByName("Boxtest").getCurrentValue()
if oForm.HasByName("F_HOME") then
oForm = oForm.getByName("F_HOME")
valueData =
oForm.Component.DrawPage.Forms.getByName("HomeForm").getByName("prenom_box").getCurrentValue()
ThisComponent.Drawpage.Forms.getByName("Form").getByName("prenomMere").Text = valueData
getMotherLastName
End if
End Sub