The event driven way I used is to set up a message class, clsMsgPD. See my blog for that. Or the demo database.
In the dblClick in frmTestEditField some text box (named correctly) ... txtDE then XXXXX for the rest of the text box name.
I open frmLngDataEntry, then call a function in clsMsgPD.Send to pass a pointer to the text box over to frmLngDataEntry.
Over in frmLngDataEntry I sink events from the message class. Grab the pointer to the text box passed in. Copy the contents into the big text box for editing.
Once the user finishes editing to their hearts content, they close the form
As the form closes it moves the new edited data back into the text box originally passed in and closes the form.
Why go through all this? Because I can now add this behavior to clsCtlTxt. clsCtlText now can sink the dbl_Click event for any text box, anywhere, in any form. If the text box is named to a convention, it can call clsMsgPD.Send to pass the text control off. Any form anywhere can use this behavior of clsTxt just by naming a text box with that naming convention.
This is an event driven way. The point is to make my user interface consistent everywhere, in every form. Want a big text editing box to edit the data? You got it.
It sounds a bit complex to the Event Driven novice but for me it was a half hour development, just because it really is simple. Event Driven programming rocks!
'
'Double click will open an edit form for long text entry
'
Private Sub mctlTxt_DblClick(Cancel As Integer)
On Error GoTo mctlTxt_DblClick_Error
'
'Set up a naming convention for this text control wrapper to recognize
'The text box name has to start with txtDE
'for "text data entry"
'
'This allows the developer to create a user interface to
'edit long text fields easily and consistently
'
If Left$(mctlTxt.Name, 5) = "txtDE" Then
'
'If it starts with that "txtDE" then
'Open the data entry form
'
DoCmd.OpenForm "frmLongDataEntry"
'
'Send a message to the form, passing in this text box control
'Pass in "frmDataEntry" as the to: in the message
'and mctlTxt in the Msg:
'
clsMsgPD.Send "", "frmLongDataEntry", "", mctlTxt
'
End If
Exit_mctlTxt_DblClick:
On Error GoTo 0
Exit Sub