access2003 form field cursor

  • Follow


I have a drop down field to select an invoice to print, but if the field has 
data in it already from a previous selection The cursor appears as just a 
line at the end of the field. How can I make the cursor select the whole 
field without the user needing to click and drag??

I thought I remembered doing this before, by a property setting, but I can 
find it.  does someone out there know how to do this??
0
Reply Utf 12/14/2007 4:22:02 PM

Why in the world are you trying to drag the value in a combo box?
-- 
Dave Hargis, Microsoft Access MVP


"Programmer - wannaB" wrote:

> I have a drop down field to select an invoice to print, but if the field has 
> data in it already from a previous selection The cursor appears as just a 
> line at the end of the field. How can I make the cursor select the whole 
> field without the user needing to click and drag??
> 
> I thought I remembered doing this before, by a property setting, but I can 
> find it.  does someone out there know how to do this??
0
Reply Utf 12/14/2007 5:18:02 PM


You misunderstood my question;
by click and drag I am saying that they need to click the mouse in the combo 
box and drag across the field to highlight the data already there,and then 
either remove it or begin typing to replace what they hightlighted and get 
there new selection.
I have already added Me!<formname>.dropdown
to on click.   Now I would like for the curson to select the whole field 
when the user clicks the field.   Can I add something like SELECTALL to the 
on click, or is there a form or field param that can be set to select entire 
field???

"Klatuu" wrote:

> Why in the world are you trying to drag the value in a combo box?
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "Programmer - wannaB" wrote:
> 
> > I have a drop down field to select an invoice to print, but if the field has 
> > data in it already from a previous selection The cursor appears as just a 
> > line at the end of the field. How can I make the cursor select the whole 
> > field without the user needing to click and drag??
> > 
> > I thought I remembered doing this before, by a property setting, but I can 
> > find it.  does someone out there know how to do this??
0
Reply Utf 12/14/2007 6:50:01 PM

Okay, sorry I misunderstood.

You can use the SelStart and SelLength properties to do this. Use the 
combo's Got Focus event

    With Me.MyCombo
        .SelStart = 0
        .SelLength = Len(Me.MyCombo)
    End With

-- 
Dave Hargis, Microsoft Access MVP


"Programmer - wannaB" wrote:

> You misunderstood my question;
> by click and drag I am saying that they need to click the mouse in the combo 
> box and drag across the field to highlight the data already there,and then 
> either remove it or begin typing to replace what they hightlighted and get 
> there new selection.
> I have already added Me!<formname>.dropdown
> to on click.   Now I would like for the curson to select the whole field 
> when the user clicks the field.   Can I add something like SELECTALL to the 
> on click, or is there a form or field param that can be set to select entire 
> field???
> 
> "Klatuu" wrote:
> 
> > Why in the world are you trying to drag the value in a combo box?
> > -- 
> > Dave Hargis, Microsoft Access MVP
> > 
> > 
> > "Programmer - wannaB" wrote:
> > 
> > > I have a drop down field to select an invoice to print, but if the field has 
> > > data in it already from a previous selection The cursor appears as just a 
> > > line at the end of the field. How can I make the cursor select the whole 
> > > field without the user needing to click and drag??
> > > 
> > > I thought I remembered doing this before, by a property setting, but I can 
> > > find it.  does someone out there know how to do this??
0
Reply Utf 12/14/2007 6:56:00 PM

Thanks that helped.
All I really needed was
Me.MyCombo.SelStart = 0
With that when they click at the end of the field it will highlight 
everything to the cursor.  it works great thanks.
============================
"Klatuu" wrote:

> Okay, sorry I misunderstood.
> 
> You can use the SelStart and SelLength properties to do this. Use the 
> combo's Got Focus event
> 
>     With Me.MyCombo
>         .SelStart = 0
>         .SelLength = Len(Me.MyCombo)
>     End With
> 
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "Programmer - wannaB" wrote:
> 
> > You misunderstood my question;
> > by click and drag I am saying that they need to click the mouse in the combo 
> > box and drag across the field to highlight the data already there,and then 
> > either remove it or begin typing to replace what they hightlighted and get 
> > there new selection.
> > I have already added Me!<formname>.dropdown
> > to on click.   Now I would like for the curson to select the whole field 
> > when the user clicks the field.   Can I add something like SELECTALL to the 
> > on click, or is there a form or field param that can be set to select entire 
> > field???
> > 
> > "Klatuu" wrote:
> > 
> > > Why in the world are you trying to drag the value in a combo box?
> > > -- 
> > > Dave Hargis, Microsoft Access MVP
> > > 
> > > 
> > > "Programmer - wannaB" wrote:
> > > 
> > > > I have a drop down field to select an invoice to print, but if the field has 
> > > > data in it already from a previous selection The cursor appears as just a 
> > > > line at the end of the field. How can I make the cursor select the whole 
> > > > field without the user needing to click and drag??
> > > > 
> > > > I thought I remembered doing this before, by a property setting, but I can 
> > > > find it.  does someone out there know how to do this??
0
Reply Utf 12/14/2007 7:31:01 PM

4 Replies
325 Views

(page loaded in 0.809 seconds)

Similiar Articles:
















7/25/2012 9:02:59 PM


Reply: