Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: List box and combo box


Message #1 by "e n z o" <enzaux@g...> on Fri, 22 Mar 2002 10:55:17 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_0225_01C1D190.0D8B8DF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all!!!

    I would like to ask things about this boxes.

LIST BOX:
- how could I make this box to respond upon pressing enter after 
choosing  an item from this box?  I've tried using On_Enter event but 
what it does is from the time it got the focus it already executes the 
On_Enter event.
- I noticed that list box contains a blank row at the end, is there 
anyway I can remove this?  My list box is bount to query.

COMBO BOX:
- w/o using mouse, the dropdown box will not show unless you press ALT + 
Down arrow key, is there any way that as soon as the combo box has the 
focus it will immediately show or pull down the menu already?

Thanks,

Enzo :)


Message #2 by brian.skelton@b... on Fri, 22 Mar 2002 09:59:55
Hi Enzo

The On_Enter event happens when the control receives the focus, just 
before the On_Got_Focus event. I has nothing to do with the <enter> key.

To respond to the <enter> key try using the On_Key_Press or On_Key_Down 
events. One of them will work

Combo boxes have a DropDown method. You could call this from the On_Focus 
event to automatically drop the list.

Brian

> 
This is a multi-part message in MIME format.

------=_NextPart_000_0225_01C1D190.0D8B8DF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all!!!

    I would like to ask things about this boxes.

LIST BOX:
- how could I make this box to respond upon pressing enter after 
choosing  an item from this box?  I've tried using On_Enter event but 
what it does is from the time it got the focus it already executes the 
On_Enter event.
- I noticed that list box contains a blank row at the end, is there 
anyway I can remove this?  My list box is bount to query.

COMBO BOX:
- w/o using mouse, the dropdown box will not show unless you press ALT + 
Down arrow key, is there any way that as soon as the combo box has the 
focus it will immediately show or pull down the menu already?

Thanks,

Enzo :)


Message #3 by "e n z o" <enzaux@g...> on Mon, 25 Mar 2002 09:40:55 +0800
Brian,

 Thanks for the dropdown thing.  Now the only problem I have is when I try
to press enter on a list box. I put my code on On key press event that if
the user hits vbkeyreturn then it will execute my code.  But it's still not
working.

Thanks,
enzo :)
----- Original Message -----
From: <brian.skelton@b...>
To: "Access" <access@p...>
Sent: Friday, March 22, 2002 9:59 AM
Subject: [access] Re: List box and combo box


> Hi Enzo
>
> The On_Enter event happens when the control receives the focus, just
> before the On_Got_Focus event. I has nothing to do with the <enter> key.
>
> To respond to the <enter> key try using the On_Key_Press or On_Key_Down
> events. One of them will work
>
> Combo boxes have a DropDown method. You could call this from the On_Focus
> event to automatically drop the list.
>
> Brian
>
> >
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0225_01C1D190.0D8B8DF0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi all!!!
>
>     I would like to ask things about this boxes.
>
> LIST BOX:
> - how could I make this box to respond upon pressing enter after 
> choosing  an item from this box?  I've tried using On_Enter event but 
> what it does is from the time it got the focus it already executes the 
> On_Enter event.
> - I noticed that list box contains a blank row at the end, is there 
> anyway I can remove this?  My list box is bount to query.
>
> COMBO BOX:
> - w/o using mouse, the dropdown box will not show unless you press ALT + 
> Down arrow key, is there any way that as soon as the combo box has the 
> focus it will immediately show or pull down the menu already?
>
> Thanks,
>
> Enzo :)
>
> ------=_NextPart_000_0225_01C1D190.0D8B8DF0
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; 
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>Hi all!!!</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I would like to ask 
> things about
> this boxes.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>LIST BOX:</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>- how could I make this box to respond 
> upon
> pressing enter after choosing&nbsp; an item from this box?&nbsp; I've 
> tried
> using On_Enter event but what it does is from the time it got the focus 
> it
> already executes the On_Enter event.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>- I noticed that list box contains a 
> blank row at
> the end, is there anyway I can remove this?&nbsp; My list box is bount 
> to
> query.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>COMBO BOX:</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>- w/o using mouse, the dropdown box 
> will not show
> unless you press ALT + Down arrow key, is there any way that as soon as 
> the
> combo box has the focus it will immediately show or pull down the menu
> already?</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Enzo :)</FONT></DIV>
> ---
> <BR>
> <BR>
> </BODY></HTML>
>
> ------=_NextPart_000_0225_01C1D190.0D8B8DF0--
>
>

Message #4 by brian.skelton@b... on Tue, 26 Mar 2002 12:24:30
Enzo

If you could post the code in the Key Press event I'll have a look.

Brian

> Brian,

 Thanks for the dropdown thing.  Now the only problem I have is when I try
to press enter on a list box. I put my code on On key press event that if
the user hits vbkeyreturn then it will execute my code.  But it's still not
working.

Thanks,
enzo :)
Message #5 by "e n z o" <enzaux@g...> on Wed, 27 Mar 2002 08:23:07 +0800
Brian,

Below is my code for both keydown and kepress event

Private Sub lstSender_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
    'process goes here
  End If
End Sub

Private Sub lstSender_KeyPress(KeyAscii As Integer)
  If KeyAscii = vbKeyReturn Then
   ' process go here
 End If
End Sub

Thank you very much Brian!!!

Enzo :)
----- Original Message -----
From: <brian.skelton@b...>
To: "Access" <access@p...>
Sent: Tuesday, March 26, 2002 12:24 PM
Subject: [access] Re: List box and combo box


> Enzo
>
> If you could post the code in the Key Press event I'll have a look.
>
> Brian
>
> > Brian,
>
>  Thanks for the dropdown thing.  Now the only problem I have is when I try
> to press enter on a list box. I put my code on On key press event that if
> the user hits vbkeyreturn then it will execute my code.  But it's still
not
> working.
>
> Thanks,
> enzo :)


  Return to Index