Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Expert > X01 > < B9 | X02 >
Back to Access Expert 1    Comments List
Field Type for Related Fields Upload Images   Link   Email  
Tanya Culic      
2 years ago
In the video Access Expert 1, Lesson 2 you identify the CustomerID, LeadSourceID and ShippingID as a Number in the ContactT but you won't use them in a calculation.

In other lessons you have talked about the difference of text vs numbers types but you don't explain why you are using numbers in this situation as it seems to be inconsistent to the suggested application of the type field.

Can you explain this for me to understand?
Adam Schwanz             
2 years ago
Those kinds of fields we are making only for Access to use, we use them to setup relationships. CustomerT having the customerID of 1 and for instance, and OrderT with an order for that customer would store CustomerID of 1 as well. This way you can bring in information like name, address, phone, etc from the customer table into that order that you may want to use without storing the customers information a second time in the order table.

You may want to watch Expert 1 a couple of times, relationships are a very important part of a database. You may also want to watch Relationships

While you can use short text primary keys, it's easier to just let access handle that with an autonumber and a number field in the related table.
Tanya Culic      
2 years ago
I understand the relationship. I don't understand why you would change it to a 'number' field type if you are not going to use it 8n a calculation.
Adam Schwanz             
2 years ago
Numbers are not just for calculations. In the same way you might store a zip code, phone number, or invoice number as a number. If you don't need to use letters or symbols in it, you're almost always better off just making it a number field.

One of the reasons you could want to do this is with sorting. If you use a short text field for numbers, it's not smart enough on its own to count. Instead of doing 1,2,3,4,5,6,7,8,9,10,11 you would get 1,10,11,2,3,4,5,6,7,8,9 because it sees the 1 and puts it ahead of 2 without even looking at the rest of it.
Allan McConnell       
2 years ago
Ok the way I see it and hope this makes sense is that yes you use number format for calculations, however the one things that is unique about numbers are that they are infinite, and under an Autonumbering will keep spitting out unique numbers
Text on the other hand can be infinite, but relies on the user to supply that unique set of text strings to prevent a duplicate.
Once a record has been assigned a number, it is unique to that record and can be used in other tables to relate back.
Imagine how difficult as user it would be to come up with a unique Text string when your database has over 5000 records?
Adam Schwanz             
2 years ago
Allan, fun fact, autonumbers aren't actually infinite, theyre a 4 bit long integer. They will stop at 2,147,483,647 (Technically they can go negative to that as well)

You can learn more about that at Sync Remote Database
Allan McConnell       
2 years ago
Hi Adam. Thank you for that info. I did not know that and that is good to know.
I suppose then, that if the database has 2,147,483,647 records  it will still be good to have it as an Auto number and not have to keep typing in numbers or text under a text string. <Smiley Face>
I am loving all the posts and courses and have been using Access for some time now, but I am still learning a lot more. I liken myself to a shirt that needs ironing to smooth out the wrinkles. :-)
Richard Rost             
2 years ago
Like Adam said, numbers aren't JUST for calculations. I said the way you can differentiate whether or not to choose number or text for a field like phone number, ZIP code, etc. is if you would ever be doing calculations on it. This is a litmus test for natural numbers, things you come across in real life. However KEY FIELDS in your database (primary and foreign) should always be numbers. PKs are AutoNumbers. FKs are Long Integers.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 1.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/15/2024 3:32:06 AM. PLT: 1s