Selasa, 15 Mei 2012

RE: [MS_AccessPros] Populate ListBox

 

Abdul-

Ah, that article talks about filtering an already populated list in a List Box,
not adding entries. When you said "populate" I assumed you were adding relevant
entries based on what the user typed in the text box. If you're filtering an
existing list, then On Change is what you want to use, and the sample code on
that page should help you do it. I've done a similar thing in some of my apps,
but I test the length of the Text in the text box and only apply the filter
after the user types 3 or more characters. If you start filtering with the
first character typed, the list box will get filtered unnecessarily early.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul Shakeel
Sent: Tuesday, May 15, 2012 9:17 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Populate ListBox

Dear John,

I want to share a link with you, in this link is what I want to working
around but with simple code let only onChange Event do all the work, kindly
clear me about that if its possible.

http://www.opengatesw.net/ms-access-tutorials/Access-Articles/Search-As-You-Type
-Access.html

On Tue, May 15, 2012 at 11:44 PM, John Viescas <JohnV@msn.com> wrote:

> **
>
>
> Abdul-
>
> Make the List Box a Value List, and use the .AddItem method of the List Box
> control to put additional entries in the list. You probably want to use the
> After Update event of the text box. If you use On Change, that event fires
> for
> each character typed or erased. For example, if the user types
> "Abercrombie",
> the list box will contain all items:
>
> Like "A*"
>
> Like "Ab*"
>
> Like "Abe*"
>
> Like "Aber*"
>
> . and so on.
>
> John Viescas, author
>
> Microsoft Office Access 2010 Inside Out
>
> Microsoft Office Access 2007 Inside Out
>
> Building Microsoft Access Applications
>
> Microsoft Office Access 2003 Inside Out
>
> SQL Queries for Mere Mortals
>
> <http://www.viescas.com/> http://www.viescas.com/
>
> (Paris, France)
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul
> Shakeel
> Sent: Tuesday, May 15, 2012 8:08 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Populate ListBox
>
>
> Dear All
>
> I want to populate a unbound listbox from an unbound textbox onChange
> event, both the controls are on same form, the list box contains product
> name & I want when user enters any word in the text box the listbox
> required with the word entered in the textbox using LIKE statement.
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar