Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Forums > Access Forum > If a status changes by Donald Wright
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
If a status changes
Donald Wright 
    
16 years ago
Richard,
I have a table of doctors and a table of the doctors referrals to our department.  For years Dr Smith worked out of AAA Orthopedics.  Months ago he left AAA, moved out of state to aother practice. We are again receiving referrals from him.
How do I differentiate between his referrals from AAA and his new location?
In my Excel spreadsheet (which I am now preparing to become an Access database) I list him teice--as "Dr. Smith" and again as "Dr.Smith After AAA".  This seems pretty dopey to do in Access.
Any sugestions?
Thank you,
Don


Reply from Richard Rost:

If a doctor will always work at one AND ONLY ONE company/office, then you should set up a DoctorT table, and then a separate CompanyT table to track the companies they work for. Make a CompanyID field in the DoctorT table so you can tell which company the doctor currently works for.

Now, when you create a referral, you'll pick the Doctor from a drop-down list, and you can have his current COMPANY automatically populate on your referral form. You'll store BOTH the company and the doctor IDs in your referral table so you can tell them apart.

This is very similar to the technique that I use for grabbing address info from customers when you create an invoice for them. You store the address information in the customer table, and then when you pick a customer in your invoice form, the address data automatically populates on the order form. See Access 302 for details.

Now, if a doctor can work at MULTIPLE offices/companies, then the situation might get a little trickier:

The BEST way to handle this is two have THREE tables in a many-to-many relationship to track your doctors and the companies they work for: DoctorT, CompanyT.

Now you'll need a cross-reference table to link them together (DoctorXCompanyT) so you can set up relationships like:

Dr Smith, AAA Ortho
Dr Smith, XXX Family
Dr Jones, AAA Ortho
etc.

This is a many-to-many relationship that I cover in Access 309. You'll then make a form to edit your doctor information, and have subform listing all of the companies (offices) he works out of.

Now, when you generate your list of doctors, you need to create a query showing every doctor with every company, or use the TWO combo box trick where you pick a company first, then the second combo box populates with just the doctors from that company.

In either case, you're going to need to store BOTH the doctor and the company ID in your referral form.

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

Next Unseen

 
 
What's This?

 

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: 10/31/2026 12:22:11 PM. PLT: 1s