Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Using external Data in a qry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
UnderSeven - 22 Feb 2007 20:19 GMT
Hi, I'm using Access 2003

I'm running a qry as part of a form which I want to use external data with
the WHERE clause, which would be gathered from a selection on a combo box on
the same form, this would then use the qry to populate a list box.  I'm
pretty sure this is something I need to do in VB, but I'm not sure what.
Thanks.
Pat Hartman (MVP) - 22 Feb 2007 20:53 GMT
Use the parameter query as the RowSource for the listbox.  You don't need
any VB.  Unlike VB, Access listboxes and combos are bound and do not need to
be (although they can be) filled by a code loop.

> Hi, I'm using Access 2003
>
[quoted text clipped - 4 lines]
> pretty sure this is something I need to do in VB, but I'm not sure what.
> Thanks.
UnderSeven - 22 Feb 2007 21:51 GMT
So far I'm with you, but the part I'm not figuring out is how to grab the
selection from the Combobox to use as a parameter for the qry which populates
the listbox.  

> Use the parameter query as the RowSource for the listbox.  You don't need
> any VB.  Unlike VB, Access listboxes and combos are bound and do not need to
[quoted text clipped - 8 lines]
> > pretty sure this is something I need to do in VB, but I'm not sure what.
> > Thanks.
John W. Vinson - 23 Feb 2007 06:52 GMT
>So far I'm with you, but the part I'm not figuring out is how to grab the
>selection from the Combobox to use as a parameter for the qry which populates
>the listbox.  

Create a stored Query with a criterion like

=[Forms]![NameOfForm]![NameOfFirstCombo]

and base the listbox on this Query.

You'll need to Requery the listbox in the AfterUpdate event of the
combo box.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.