Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to DISTINCT v DISTINCTROW    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Distinct
Kevin Robertson 
           
11 months ago
Great video (as always).

I use DISTINCT all the time when I build Filter Combo Boxes that are based on a Query.
Thomas Gonder  @Reply  
      
11 months ago
@Kevin What kind of combo box would have two rows being the same? Can you give an example?
Kevin Robertson OP  @Reply  
           
11 months ago
A Filter Combo for State, for example, could have multiple instances of New York or multiple instances of Florida. You would only want to see one.
Kevin Robertson OP  @Reply  
           
11 months ago
Thomas The screenshots below show the perfect example.
Kevin Robertson OP  @Reply  
           
11 months ago

Kevin Robertson OP  @Reply  
           
11 months ago

Kevin Robertson OP  @Reply  
           
11 months ago
Glad I looked at this Form again. I just realised I'm sorting by the Event Name when I should be sorting by the Start Date.
Thomas Gonder  @Reply  
      
11 months ago
@Kevin Thanks for the example. If you normalized your database, you wouldn't have that problem to begin with.
Kevin Robertson OP  @Reply  
           
11 months ago
Really? The event name is WrestleMania and happens every year. How do you suggest I only show it once in the Combo Box when that name is in multiple records?
Thomas Gonder  @Reply  
      
11 months ago

Lars Schindler  @Reply  
     
11 months ago
I think Kevin's approach has its advantages if you want to have information on all ‘Money In The Bank’ events listed, for example.
Thomas Gonder  @Reply  
      
11 months ago
By reversing the artificial way that you did here.
But to be fair, I can't see the table underneath, so I can't really tell if you typed "Las Vegas" into a cell or form for each row or used a foreign key.
In the same way, I can't tell if you have two fields for the name and year.
Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago
Now, I'm guessing you're going to ask, how we know which London we're talking about?
The same way I do in this combo box below.
Note, Access has a time in date fields, so you don't need a separate start time. If you have an end date/time, then you can calculate the duration. Two fields do the work of four.
I don't know how you're storing state and country, but again, if you have a Geo Table (geography), all the data is there, so only one field is needed for this for each event's location.

I too am happy with this exercise and your comment. I found a small bug I need to fix in one of my forms. :)
Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago
Dang, now that slight OCD has got me chanting "Money in the Bank, Money in the Bank..."

The Grp Form (a universal way to "group" records) could tie all the WWE events together, again without needing to create an extra field in the Event Table.

For this app, I would modify the Search Form to look for events by organization (WWE), Grp name (Mitb), Event name (name with year), and then Begin Geo. Date range is already in the form. To get some column space, one could hack out Name1-4 as they aren't used in this app.
Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago
Look how far we've come since I used to watch Gorgeous George on a round tube B/W TV at the local barber shop!
My mother would never allow such "trash" in her living room.
https://en.wikipedia.org/wiki/Gorgeous_George
Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago

Thomas Gonder  @Reply  
      
11 months ago
As a final note. I'm sure Kevins application for wrestling events (as best as I can tell) is adequate for his purposes. Or as Richard would say, "good enough". One lesson I've learned through the years: don't try to make data make sense, or base processing rules upon it. Data is often out of our control as developers. Kevin appears to be adding the year to an event's name and then stripping it back off for his combo box. While answering Kevin, I ran across WrestleMania 41. 41 isn't a year, and it's not four digits. What if some marketing genius at WWE decides to have The ULTIMATE Money in the Bank event? The year isn't in there anywhere. How will the app know not to strip of "Bank" for the combo box?

Although not specifically stated in Cobb's original Rules of Database Normalization many have claimed this suggestion, to avoid the trap of modifying data arbitrarily, is core to the principal of Rule #1 and atomic data. The name of one event is not the name of a series of events. Star Trek episode names don't contain the words "Star Trek {i.e Voyager}".

This thread is now CLOSED. If you wish to comment, start a NEW discussion in DISTINCT v DISTINCTROW.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 12:17:02 PM. PLT: 1s