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 > Forums > Developers
Back to Access Developer Forum    Comments List
Form Question Upload Images   Link   Email  
Amina Jones 
I have a database where I have two types of clients. Employee and Customers. I have two separate tables for each. I also have a pymt table to track payments for each client. The pymt table identifies the type of customer (employee or regular customer) I have two forms, one for employee & one for customer, and each form has a pymt button. I also created a pymt form for the pymt button to view and add pymts.

The issue I am having is adding both the CustomerID and the EmployeeID to the field to the pymt form. I have to add them  in order for the pymt to show but it leaves a blank box for the employeeId field if I am viewing the customer form and the same when I view the employee form. Is there a way to get both IDs to show without the blank box showing but still showing the ID number for that type of customer?
Amina Jones 

Amina Jones 

Amina Jones 
I only want the customerid to show when i view the customer pymt history and only want the employeeid to show when i am viewing the employee pymt history
Dg Ewing 
If I am an employee and purchase something, am I assigned a customer ID, and if so how are trying to populate the employee id field on the payment history form?
Amina Jones 
The employee table has an employeeID -PK and Customer table has CustomerID - PK. The third table is the pymt table and they both use the same table. Both PKs are foreign keys in the pymts table. I have a pymt form and the pymt form is used on the employee form and the customer form.
Richard Rost 
I would put customers and employees together in the same table and just differentiate between them with a field (IsEmployee for example). Would make everything else so much easier.
Amina Jones 
I did two separate tables because the customers membership to the gym subscription is through referral link from the employee. So i did two separate tables.
Amina Jones 

Amina Jones 

Dg Ewing 
Amina, I may not yet understand your problem, my questions are seeking to understand, not to question your logic/architecture>

Your payments table does not have both customer AND employee IDs populated for any paymentID records....if your pymttransactF is reading the payments table there is no data to read....???
Dg Ewing 
Is your question how to populate the payments table with the employee ID when the transaction is an employee? and if so I would use vba on after update of the customer ID in the pymttransactF and set the employee id equal to the employee id to what appears to be subform {right hand side} on the Customer Information Form above {employee 1}
Kevin Robertson 
Can't you simply hide both ID fields?
Richard Rost 
You're going to run into problems with your joins. You could use Outer Joins for the relationships between customers to payments and employees to payments, but it's still going to be a messy situation. Again, in my professional opinion, I'd put them together in one Person table.

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

 
 
 

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: 3/28/2024 4:42:15 AM. PLT: 0s