Re: Subform field - dynamic field size - help
- From: "tina" <nospam@xxxxxxxxxxx>
- Date: Wed, 16 Nov 2005 17:57:03 GMT
not sure what you mean by
>Is there another "on" field I should be using for
>the keyboard operator?
if you want the Zoom box to open *every time* the user enters the memo
control, you can use the control's Enter event procedure to run the code i
gave you previously.
if you want to open the Zoom box by using a keyboard combination that works
*in that control only*, you use the memo control's KeyDown event procedure
to run the following code, as
If (Shift And acAltMask) > 0 Then
If KeyCode = 90 Then
DoCmd.RunCommand acCmdZoomBox
End If
End If
(Shift And acAltMask) > 0 tests to see if the Alt key is pressed. if it is,
then KeyCode = 90 is true if the letter "z" is also pressed, which is what
you'll get if you press Alt+z on the keyboard. if z is pressed, then the
Zoom box opens.
note that you can test for the Shift key or Ctrl key instead of the Alt key
(though i wouldn't because Ctrl+z runs the Windows default action "paste
from clipboard", and your user may need to use the Shift key to type a
capital Z); you can also test for another key besides "z" if you want - z
for zoom just made sense to me.
btw, one advantage here is that you can "turn back ON" the form's Shortcut
Menu setting that i instructed you to turn off for the "right click"
solution. so you can allow your user access to the shortcut menu in the
form, if you choose.
hth
"Sue Compelling" <SueCompelling@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9F675624-86E9-47A5-AB1D-D8868757F781@xxxxxxxxxxxxxxxx
> Hi Tina
>
> You've helped me before - you're a gem.
>
> This is brilliant and I've got it working [well it zooms anyway] - but I'm
> thinking. If my user is use to getting around the form using a keyboard -
> this means they have to take their hands off the keyboard to [right mouse
> click] to get it to zoom. Is there another "on" field I should be using
for
> the keyboard operator? I tried Before Update and Got Focus but they
didn't
> work.
>
> Cheers
>
>
> --
> Sue Compelling
>
>
> "tina" wrote:
>
> > i don't know of any way to do that, but you could do the next best thing
> > (kind of). you can set code in the control to open a Zoom box, which is
> > simply a window that has a lot more room to show a control's contents.
an
> > easy way to do this is to open the form in Design view, open the
Properties
> > box, click the Other tab and set the ShortcutMenu property to No. then
click
> > on the control that's bound to the memo field, go back to the Properties
> > box, click the Events tab and scroll to the OnMouseDown event. add an
event
> > procedure to the event, and add the following code in the procedure, as
> >
> > If Button = acRightButton Then
> > DoCmd.RunCommand acCmdZoomBox
> > End If
> >
> > if you don't know how to create an event procedure, see "Create a VBA
event
> > procedure" at http://home.att.net/~california.db/downloads.html for
> > illustrated instructions.
> >
> > hth
> >
> >
> > "Sue Compelling" <SueCompelling@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
> > news:4E15FA36-C3A0-457E-899E-8282DA70E6EC@xxxxxxxxxxxxxxxx
> > > Hi
> > >
> > > I have 2 tab control pages holding 3 subforms [tasks, donations and
> > notes].
> > > Each of these subforms has a comments field that I've set as a memo.
> > >
> > > My problem is I don't want to set the comments field size permanently
too
> > > large as it would take up too much room on the screen [some clients
will
> > have
> > > 50 donations records etc]. Is there a way that this field can grow
> > > dynamically, so that it only grows to the size of the characters
within it
> > > WHEN you're actually in the field. [sort of like the comments field
in
> > excel
> > > that only pop up big when you're in that cell]
> > >
> > > TIA
> > >
> > > Sue
> > > --
> > > Sue Compelling
> >
> >
> >
.
- Follow-Ups:
- Re: Subform field - dynamic field size - help
- From: Sue Compelling
- Re: Subform field - dynamic field size - help
- References:
- Prev by Date: Populate text box based on another text box entry
- Next by Date: Re: Autofill Data Into Form
- Previous by thread: Re: Subform field - dynamic field size - help
- Next by thread: Re: Subform field - dynamic field size - help
- Index(es):