By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

SQL Help

P: 67
I have two tables: Models and Parts. Models has fields PartName and ModelID. Parts has fields PartID and ModelID. I want to select the PartID from the Parts table and the PartName for that part from the Models table, linked by the ModelID. I want to show the complete list of parts, but essentially get the name of the part from a related table instead of the Parts table. Can anyone give me a hand with the syntax? :/

Thanks!

CB55
Mar 10 '08 #1
Share this Question
Share on Google+
2 Replies


P: 67
I have two tables: Models and Parts. Models has fields PartName and ModelID. Parts has fields PartID and ModelID. I want to select the PartID from the Parts table and the PartName for that part from the Models table, linked by the ModelID. I want to show the complete list of parts, but essentially get the name of the part from a related table instead of the Parts table. Can anyone give me a hand with the syntax? :/

Thanks!

CB55
I've run into the same problem a second time... I have another case where I want to populate a field on a form, not with a field from the RecordSource, but with a field from a table related to the RecordSource table. I have a StationID field in my Tasks table which is bound by the Autonumber StationID primary key of the Stations table, but I query several columns so as to display the StationName in that field, although it is not bound by the StationName. How do I access those other columns (e.g. StationName) on my Tasks form?

Can anyone help me out? :'(

CB55
Mar 11 '08 #2

P: 15
You can display a Name field, but internally use the ID to store within the database. Try setting the column count property to 2 on the drop down list, but bind to the first column (the ID).

http://www.db-pros.com
Mar 11 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.