Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expanding Memo Box 1

Status
Not open for further replies.

Ali29J

Technical User
May 13, 2004
203
GB
Hi All

I have a master form "followup" with continuos subform which is filtered by the master form to combo selection.

Is it possible for the records of continuous subform to expand to accomodate the full text in the memo text box, at present they are at set sizes even when i check the can expand on properties menu for the memo box?/

thanks

Ali
 
how are ya Ali29J . . .

I believe your referring to the [blue]Can Shrink/Grow[/blue] properties. These properties are for printing (particularly in reports). So basically your stuck with fixed sizes.

You can however zoom individual memo fields by hitting [blue]Shift + F2[/blue] or in code:
Code:
[blue]   docmd.RunCommand acCmdZoomBox[/blue]

Calvin.gif
See Ya! . . . . . .
 
When you do that, the text is selected. Is there a way to automatically de-select the text once the zoom box comes up?
Otherwise users may start typing and lose the text that was already there, when all they wanted to do was to add to the end of the text.

"Character cannot be developed in ease and quiet. Only through experience of trial and suffering can the soul be strengthened, ambition inspired, and success achieved." - Helen Keller
 
NorthNone said:
[blue]When you do that, the text is selected. [purple]Is there a way to automatically de-select the text once the zoom box comes up?[/purple][/blue]
Not to my knowledge . . . however using a form and an independent table you can make your own ZoomBox and have full control . . .

Calvin.gif
See Ya! . . . . . .
 
Another fairly simple way would be to place a large text box (call it Zoombox) on your form. Assign it the same Control Source as the field you want to expand, and make it visible by double clicking the field you want expanded.

Substitute the actual name of your field to be expanded for YourFieldName.

Private Sub Form_Load()
'Make the textbox invisible on loading the form
Zoombox.Visible = False
End Sub


Private YourFieldName_DblClick(Cancel As Integer)
'When you double click the field, make the ZoomBox
'visible and move the cursor to the beginning to
'deselct the text
Zoombox.Visible = True
Zoombox.SetFocus
Zoombox.SelStart = 0
End Sub

Private Sub Zoombox_DblClick(Cancel As Integer)
'Double click the ZoomBox to close it and
'return to your original field
Me.YourFieldName.SetFocus
Zoombox.Visible = False
End Sub



The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Howdy missinglinq . . .

The [blue]textbox[/blue] 255 character limit is what stopped me from posting the same, however onsecond thought its not a bad Idea . . . just need to get a memo field in there somehow . . .

Calvin.gif
See Ya! . . . . . .
 
NorthNone . . .

Add a [blue]memo[/blue] field to the underlying table and make sure its included in the [blue]RecordSource[/blue] of the form. Then follow [blue]missinglinq's[/blue] suggestion using the memo instead! . . .

Calvin.gif
See Ya! . . . . . .
 
Thanks!!!

"Character cannot be developed in ease and quiet. Only through experience of trial and suffering can the soul be strengthened, ambition inspired, and success achieved." - Helen Keller
 
NorthNone . . .

Be aware: using an independent table with just the memo field and building your zoom form on this table,is the better way to, as you wont accuulate memo's per record and the zoom form will be available globally! . . .

Calvin.gif
See Ya! . . . . . .
 
Good point about the memo field, Aceman1! Forgot that was what we we starting with!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top