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 / Forms / March 2007

Tip: Looking for answers? Try searching our database.

How To Filter Combo Box Items And Display First Item

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paputxi - 24 Mar 2007 03:17 GMT
I have two tables, say, TblA and TblB.  There is a one-to-many relationship
between TblA and TblB.  I have a form where I can navigate between each
record in TblA.  (So, that works fine.)  In the form, I have a combo box
where I want to display the records in TblB that are associated with the
current record from TblA.  However, the combo box displays ALL the records in
TblB, not just those to the current record in TblA.  I’m sure there is an
easy solution, but I can’t seem to figure it out.  

Also, is there a way to have the first returned record from TblB displayed
in the combo box display?  Right now, the combo box appears blank.  However,
when I click the down arrow, I see the records.

Any advice would be greatly appreciated.  Thanks in advance.
John W. Vinson - 24 Mar 2007 18:09 GMT
>I have two tables, say, TblA and TblB.  There is a one-to-many relationship
>between TblA and TblB.  I have a form where I can navigate between each
[quoted text clipped - 9 lines]
>
>Any advice would be greatly appreciated.  Thanks in advance.

Do you really want a combo box? If you want to be able to see all the fields
in TblB associated with each record in TblA, and edit them, a continuous
Subform would be a more appropriate tool.

That said... if you do want a combo box to be able to *select* (but not edit)
one associated record from TblB (and presumably use VBA code to do something
with that selection), base the combo box on a Query referencing a control on
the form bound to the linking field:

=Forms![yourformname]![controlname]

as a criterion on the linking field.

If this still shows blank, please post the following properties of the combo:

RowSource (post the SQL view)
Control Source
ColumnCount
ColumnWidths

            John W. Vinson [MVP]
Paputxi - 28 Mar 2007 00:03 GMT
Thanks, John.  For this situation, I  have many other fields that I am
displaying on the form and am trying to display muliple dropdown lists
grouped together, hence, not being able to use subforms since they take up so
much room on a form, from what I've seen.  So, just displaying the items in a
dropdown list is what I want, or at least that effect.  The user will use a
different form to input or modify any items in the list.  I know this is
different than the usually usage of the combo box.  Thanks again for your
help.

> >I have two tables, say, TblA and TblB.  There is a one-to-many relationship
> >between TblA and TblB.  I have a form where I can navigate between each
[quoted text clipped - 31 lines]
>
>              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.