Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-13-2019, 11:33 PM   #16
June7
AWF VIP
 
June7's Avatar
 
Join Date: Mar 2014
Location: The Great Land
Posts: 2,479
Thanks: 0
Thanked 578 Times in 574 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: Lookup Fields are evil? Or is this ok? Need a little guidance

I agree about consistency in naming convention. I understand you were not indicating underscore was bad. But I did have issue with suggestion field names should be same. Actually first time I've ever heard anyone promote that.

__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by June7; 11-13-2019 at 11:51 PM.
June7 is offline   Reply With Quote
Old 11-13-2019, 11:57 PM   #17
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,383
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Lookup Fields are evil? Or is this ok? Need a little guidance

Whilst I can see the merits in using _fk / _pk suffixes, I agree with Pat's comments and never use them myself.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-15-2019, 03:55 PM   #18
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,112
Thanks: 20
Thanked 400 Times in 393 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: Lookup Fields are evil? Or is this ok? Need a little guidance

One special note about using lookups in ACCESS; you will often want to base them on a query rather than the underlying table. This means you can create queries that return just the subset that is relevant in an easy to use manner.

In your particular case, you could create a query on truck number that has the Truck number's Primary Key, the displayed truck number, and the parent carrier's carrier name for use when you want to look up the truck number. This also means you can then sort the truck numbers by carrier to logically group them together. Very easy to do when defining a query but a little more difficult if you try to work it into the source for a combo box.

Mark_ is offline   Reply With Quote
Old 11-15-2019, 09:12 PM   #19
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,316
Thanks: 15
Thanked 1,601 Times in 1,520 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Lookup Fields are evil? Or is this ok? Need a little guidance

If you want to suffix with _pk and _fk, I don't object. I don't do it, but it is not wrong. CustomerID_PK and CustomerID_FK is not confusing. It is the subtle differences like customer vs customerID or cust or custID which I object to. That type of inconsistency just causes confusion. Keep in mind that in queries that join related tables, you don't select both the pk and the fk. You only select the fk so you should never end up with with two fields named CustomerID having to be selected in the same query. Selecting both or just selecting the PK are mistakes made by people who don't understand relationships.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup fields v lookup tables dscudder Tables 17 08-22-2013 10:45 AM
Evil of lookup tables? Johnny Tables 5 04-06-2011 03:15 PM
Question How do I eliminate my evil Lookup Fields redpenner General 1 07-28-2010 10:19 PM
Evil, EVIL report ! Guillaume777 Reports 5 05-09-2006 05:47 PM
Lookup Fields using Lookup Wizard nathangoldhill Tables 1 03-06-2005 05:37 PM




All times are GMT -8. The time now is 03:45 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World