You could use the Zoombox Command, but as with Messageboxes, you really have no control over the size or the position of the box when it pops up.
A fairly simple way would be to 'roll your own' Zoombox with a secondary Memo Field Control.
- Place a large Textbox (call it Zoombox) on your Form.
- Size the Control and Position it as you want, being sure to cover the original Memo Field Control with it.
- Assign it the same Control Source as the Memo Field you're expanding (yes, two Controls on one Form can have the same Control Source)
- Set the Visibility for this Zoombox to 'No,' by Default, in the Properties Pane.
- When you want to 'expand' the Memo Field Control, Re-set the Visibility for this Zoombox to 'Yes' by Double-Clicking the original Memo Field Control.
Now, use these code bits, substituting (in the 2nd and 3rd code bits) the actual name of your original Memo Control to be expanded for YourTextBox.
Code:
Private Sub Form_Load()
'Make the Textbox Invisible on loading the Form
Zoombox.Visible = False
End Sub
Code:
Private Sub YourTextBox_DblClick(Cancel As Integer)
'When you double click the field, make the ZoomBox
'visible and move the cursor to the beginning to
'deselect the text
Zoombox.Visible = True
Zoombox.SetFocus
Zoombox.SelStart = 0
End Sub
Code:
Private Sub Zoombox_DblClick(Cancel As Integer)
'Double click the ZoomBox to close it and
'return to your original field
Me.YourTextBox.SetFocus
Zoombox.Visible = False
End Sub
So, to summarize, you Double-Click the Original Memo Field Control to 'expand' it, making Visible the Secondary Memo Field Control, enter data, then Double-Click the Secondary Memo Field Control to close it, leaving the Original Memo Field Control showing, once again.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007