"Deano" <deanma66999@hotmail.com> wrote in
news:nItnc.1971$NK4.166572@stones.force9.net:
[color=blue]
> MGFoster wrote:[color=green]
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>> That is the default action of the Zoom box. You won't be able to
>> fix it.[/color]
>
> Ah, that's a bit of a downer. I have a continuous form and each
> record has a smallish textbox where the user can enter some notes.
> These notes could be quite long hence the zoom box. I just
> realised that you have to type continuously instead of being able
> to hit enter to get a carriage return. Of course you can do this
> at any time if you stay in the textbox. I think that's a bit
> silly to be honest and doesn't offer a very friendly interface.
>[color=green]
>>
>> If you are using a Text Box & you want to be able to hit Enter
>> w/o moving to next field/record, you have to set the Text Box's
>> "Enter Key Behavior" (under the Properties dialog box Other tab)
>> to "New Line in Field."[/color]
>
> Yes I think I must have this set up ok for me to be able to hit
> enter and generate a new line successfully.
>
> Is there an alternative to zooming? Or would i have to code up a
> pop up form for the user to use (which sounds like alot work to
> me...)[/color]
The ZoomBox is just a form in one of the wizard MDEs that ships with
Access.
You could replicate it yourself with a text box that has your
preferred enter key.
The way I'd do it is create the zoom form with an unbound text box
set to have your preferred Enter key behavior. Assume that you're
going to pass the form the data you want edited in the form's OnLoad
event. To do that, check if Me.Openargs = vbNullString or not. If it
doesn't, then put the value of Me.Openargs in the textbox on the
form. Then, for the form's CLOSE button, have it hide the form
instead of closing it. The way I handle this is that I make the
CANCEL button also hide the form, but it sets the form's .Tag
property to CANCEL. This leaves the form open after you're done with
it so that code that follows can process the values in the form.
Then, wrap that form in a function. I'd do it like this:
Public Sub MyZoom(ctl As Control)
DoCmd.OpenForm "dlgMyZoom", , , , , acDialog,ctl.Value
If Forms!dlgMyZoom.Tag <> "Cancel" Then
ctl = Forms!dlgMyZoom!txtMemo
End If
DoCmd.Close acForm, "dlgMyZoom"
End Sub
This would allow you to customize your zoom form to your heart's
content.
--
David W. Fenton
http://www.bway.net/~dfenton
dfenton at bway dot net
http://www.bway.net/~dfassoc