[AccessD] acCmdZoomBox issues

Edward Zuris edzedz at comcast.net
Thu Jun 24 10:47:21 CDT 2010



 You are correct!

 The text is un-selected and the cursor 
 is at the end of the data.

 Perfect!

 The below code works.

     SendKeys "{F2}"
     DoCmd.RunCommand acCmdZoomBox


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Tuesday, June 22, 2010 3:13 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] acCmdZoomBox issues


Hi Ed,

Did you miss my one about Sendkeys("{F2}") before calling the Docmd ?

This following works for me.  I don't know how the first sendkeys works
since it is before the 
Zoombox is called, but for some reason it does the trick. Personally I
wouldn't use it in 
production code because I don't understand it or trust it to work on the
next OS or Access 
version. 

I'd still build a simple generic popup form along the lines David
suggested. It  only takes a few 
lines of code to populate it with the contents of the current control
and save the edited data 
back into the control on close if desired,  That gives you total control
over whether the user 
can edit the zoomed data or not in a specific situation.

Private Sub Comments_DblClick(Cancel As Integer)
SendKeys ("{F2}")  'sets cursor at end of zoombox when next line
executed DoCmd.RunCommand acCmdZoomBox SendKeys ("{F2}{F2}") 'sets
cursor at end of textbox when focus returns to it End Sub




-- 
Stuart

On 22 Jun 2010 at 11:17, Edward Zuris wrote:

> 
>  Thanks Jim and Steve.
> 
>  I can try to teach the users to use the click
>  the left mouse button.
> 
>  I don't suppose Access has some easy way of just
>  forcing the click the left mouse button.
> 
>  Ed.
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Hewson
> Sent: Monday, June 21, 2010 3:00 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] acCmdZoomBox issues
> 
> 
> Sorry, I fat fingered the first email... let me try it again.
> 
> What have done is put a small button next to the field.
> On the click event of the button I put something like:
>     Me.txtbox.SetFocus
>     DoCmd.RunCommand acCmdZoomBox
> 
> It does open the zoom box but I instruct the users to click the left 
> mouse button and then usually the cursor is at the end of the box.
> 
> Jim
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Edward 
> Zuris
> Sent: Monday, June 21, 2010 3:12 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] acCmdZoomBox issues
> 
> 
>  The reason for the zoom box is because
>  there is limited form space.
> 
>  So I tried to teach the customer to use  Shift+F2, but they keep 
> forgetting how to
>  launch it.   So, I could teach them to
>  double or single click instead.
> 
>  I think the zoom box is a different object  than the text box.  Is 
> there like me.zoom,  etc ?
> 
>  Thanks.
> 
>  Edz. . . .
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David 
> McAfee
> Sent: Monday, June 21, 2010 12:58 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] acCmdZoomBox issues
> 
> 
> I thought I did it the 2nd way years ago, but testing it this morning 
> I see it opens the Zoom box in a modal mode.
> 
> You might have to create a simple pop up form as suggested by Stuart.
> 
> You can use a bigger text box with larger font and force the entry at 
> the end of the existing text.
> 
> What is the reason for the Zoom box? Usually they should be used to 
> display more data than is allowed on the form or datasheet. If they 
> are allowed to edit/enter data, I'd force them to do it via a new pop 
> up form, emulating a zoom box.
> 
> D
> 
> On Sun, Jun 20, 2010 at 5:44 PM, Edward Zuris <edzedz at comcast.net>
> wrote:
> >
> >  Thanks David
> >
> >  I have been playing with that
> >  and it seems to have no effect.
> >
> >  - - - Example - - -
> >
> >    With Me.txtTaskDescriptionN
> >            .SetFocus
> >            .SelStart = Len(.Text) + 1
> >    End With
> >
> >    DoCmd.RunCommand acCmdZoomBox
> >
> >  - - - Or - - -
> >
> >    DoCmd.RunCommand acCmdZoomBox
> >
> >    With Me.txtTaskDescriptionN
> >            .SetFocus
> >            .SelStart = Len(.Text) + 1
> >    End With
> >
> >  - - - Or - - -
> >
> >    DoCmd.RunCommand acCmdZoomBox
> >
> >    With Me.txtTaskDescriptionN
> >            .SetFocus
> >            .SelStart = 10
> >            .SelLength = 5
> >    End With
> >
> >    DoEvents
> >
> >
> >  - - - - Any more Ideas to Try ? - - - -
> >
> >
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David 
> > McAfee
> > Sent: Sunday, June 20, 2010 6:28 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] acCmdZoomBox issues
> >
> >
> > Look into SelStart and Len(MyTextBox.Text)+1
> >
> > Sent from my Droid phone.
> >
> > On Jun 20, 2010 4:47 PM, "Edward Zuris" <edzedz at comcast.net> wrote:
> >
> >
> >
> >  When using the (DoCmd.RunCommand acCmdZoomBox) to do
> >
> >  a shift+F2 zoom on a text box all text is selected.
> >
> >
> >
> >  So if a customer fat fingers something or wants to
> >
> >  add something starts typing, without clicking at the
> >
> >  bottom-end of the data, all the previous information
> >
> >  is erased.
> >
> >
> >
> >  Is there anyway to deselect the data appearing inside
> >
> >  the Zoom text box before the customer starts typing?
> >
> >
> >
> >  Thanks.
> >
> >
> >
> >  Sincerely,
> >
> >  Ed Zuris
> >
> >  <mailto:edzedz at comcast.net> edzedz at comcast.net
> >
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list