Full Version: Allow user to open text box in larger separate window
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
DSC
Hi- I have certain fields in which the user will need to enter significant amounts of text. If I want to allow the user to open the text box in a separate text window that pops up what do I need to do? Thanks in advance.
Jack Cowley
Create a separate form with a large text box. Bind the text box the the field in the table. (The Record Source for the form will be the table.) Open the form with:

DoCmd.OpenForm "NameOfForm", , , "[PrimaryKeyID] = " & Me.NameOfControlOnCurrentFormWithRecordID

hth,
Jack
ScottGem
Create a form with a larger text box. Then use an event trigger (a button or the double click) to open the form using a filter for the current record:


Dim strFilter as String
strfilter = "[keyfield] = " & Me.txtkeyfield

DoCmd.OpenForm "Formname",,,strfilter
SerranoG
Access allows one to do that anyway without the use of forms or VBA programming. Simply place your cursor in the text box, press SHIFT+F2 and a Zoom box opens. You can change the font for that zoom box to any size for easy reading. When you're done reading/editing, click OK.
ScottGem
Greg,
I didn't know that. Is it possible to open that in an Event? Like the double click event?
SerranoG
The only way I know of is to use this on the double-click event:

CODE
SendKeys "+{F2}", True

I don't know of any zoom properties I can invoke, e.g. Me.txtBox.Zoom = True. If anyone can find some obscure one, please let us know.
R. Hicks
All that is needed here is to use the On Double Click event of the control:

CODE
Private Sub ControlName_DblClick(Cancel As Integer)
DoCmd.RunCommand acCmdZoomBox
End Sub

RDH
SerranoG
Bingo! Thanks, Ricky. I knew there had to be a way to "properly" invoke it but the exact method eluded me... and, of course, Access help was useless.
ScottGem
Thanks to you both. That is a great tool.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.