Sorry if I do not speak well but I'm using an online translator.
i have this macro:
Code: Select all
REM ***** INSERIRE VOTI *****
Global nCursor As Long
Global sTextBox As String
Global oText As Object
Sub SingleLine_TextBox_StoreCursor (oEvent As Object) 'Text Box > Events > When Losing Focus
sTextBox = oEvent.Source.Model.Name
oText = oEvent.Source.AccessibleContext
nCursor = oText.CaretPosition
End Sub
Sub SingleLine_TextBox_Insert_Quattro (oEvent As Object) 'Button > Events > Execute
oText.insertText(("15/01/12"),nCursor)
oForm = oEvent.Source.Model.Parent
oForm.GetByName(sTextBox).commit()
IF oForm.isnew THEN oForm.insertRow() ELSE oForm.updateRow()
End Sub
I have a main form and subform, I would like the date (eg 1/15/12) is incorporated in the subform that is connected to the main form by relationship (Last Name, First Name, Date of Birth)
Mainform = Full name, date of birth
Subform = Full name, date of birth, presence)
I would make sure that if I click the button I insert the subform name, first name, date of birth, presence (which is imposed directly in the macro).
Thanks for the answers you give me.
P. S. forum in my country do not know an answer.
My database is with mysql