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 / Database Design / October 2005

Tip: Looking for answers? Try searching our database.

Need help with RowSource in Lookup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron A. - 29 Oct 2005 19:10 GMT
When selecting a modelID for a related table I have all the fields show from
the lookup of the Models table because I have many different years and makes
related to a model type, but when selecting the correct model only the year
shows in the field of the related table.  Is there a way I can select what
columns show?
Signature

Aloha,
Ron A.

'69 Camaro - 29 Oct 2005 20:24 GMT
Hi, Ron.

Don't use a lookup field.  For an explanation of why, please see the tip,
"The Evils of Lookup Fields in Tables," on the following Web page:

http://www.mvps.org/access/lookupfields.htm

Instead, use a combo box on a form (where all data entry should be made
anyway).  The combo box can use a multi-columned query as its Row Source
Property with the Column Count and Column Widths Properties set to only show
the necessary columns.  The first visible column will be the column that is
displayed in the combo box.  For example, if the query has four columns with
the last three of them visible (the first column is the primary key, so use
0" width to make it invisible), the second column will show in the combo box
after the user makes the selection:

Column Count:  4
Column Widths:  0";0.5";1";1"

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers.  Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.

> When selecting a modelID for a related table I have all the fields show from
> the lookup of the Models table because I have many different years and makes
> related to a model type, but when selecting the correct model only the year
> shows in the field of the related table.  Is there a way I can select what
> columns show?
Pat Hartman(MVP) - 29 Oct 2005 22:33 GMT
Create a query that joins the main table to the lookup table.  Use that as
the RecordSource for the form.  You will be able to select whatever fields
you want from the lookup table and bind them to controls on your form.  No
code is required.  As soon as the ModelID is chosen from the combo, the
related fields will auto fill.  To avoid accidentally changing this
"related" data on this form, it is best to set the Locked property to Yes
for those controls.

> When selecting a modelID for a related table I have all the fields show
> from
[quoted text clipped - 4 lines]
> shows in the field of the related table.  Is there a way I can select what
> columns show?
 
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.