Selasa, 15 Mei 2012

Re: [MS_AccessPros] Populate ListBox

Dear John

Yes, what you say is exactly want to do with my list box I am currently
using this query behind my list box as rowsource

SELECT Inventory.InventoryCode AS Expr1, Inventory.InventoryName AS Expr2,
Inventory.[Qty Available] AS Expr3
FROM Inventory
WHERE ((([Inventory].[InventoryName]) Like "*" &
[forms]![frmSearchInventory]![txtSearch] & "*"))
ORDER BY Inventory.InventoryCode;


and on after update event of text box I call
Me.MyList.Requery

after typing the name of the product or some part of it when user hits
enter the list is filter to the nearest one, but now I want to change it
with "Find as you type" thing,I am glad to have share with me your
application which starts searching after user type three words, or please
give me any solution to do this, I am not going to use the code given in
link I have share with you earlier because it some time hang and exhausted
the whole database.


On Wed, May 16, 2012 at 12:41 AM, John Viescas <JohnV@msn.com> wrote:

> **
>
>
> 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
>
>
>


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



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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar