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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize memofield and bring to front 1

Status
Not open for further replies.

Fenrirshowl

Technical User
Apr 29, 2003
357
GB
Hi Guys

Probably an easy question:

I have a form with a memofield above a subform. I am trying to set a doubleclick event that changes the height of the memofield (so more of the text is visible). This works fine, except when the height is increased the additional space is behind the subform (and therefore can't be read).

Code used:
Code:
Private Sub GeneralSchemeInfo_DblClick(Cancel As Integer)
If GeneralSchemeInfo.Height = 4000 Then
    GeneralSchemeInfo.Height = 950
Else
    GeneralSchemeInfo.Height = 4000
End If
End Sub

Is there a "bring to front" property or something that I can use in VBA to make the memofield lie on top of the subform? (I realise I could code the subform to no longer be visible but would like to avoid this if possible).

Thanks in advance

Fen
 
Just try setting the bring to front for the memo field text box in the form's Design View.

Format > Bring to Front

If nothing is in front of it (the state before you expand the size of the box) there's no harm done, but if you expand it it should set in front of the subform object.

Or you could really simply things and try using the

DoCmd.RunCommand acCmdZoomBox

on the double-click event.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Many thanks - have gone straight for the zoombox as I've never seen it before. Definitely one for the arsenal.

Much appreciated.

Fen

Re cat: Have you heard of using superglue and a comb?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top