We help IT Professionals succeed at work.

Populate a MS Access field based on contents of 2 other fields.

bobrossi56
bobrossi56 asked
on
119 Views
Last Modified: 2017-04-14
MS Access newbie that created a simple Access 2007 database used to assign horses to student riders. Fields are Date, StudentName, HorseName, LessonType, Instructor and Fee. When the admin creates a record she will fill in the date, the StudentName, HorseName, LessonType, Instructor are combo boxes that look up the drop down data in their respective tables. The Fee field is manually filled in by the admin based on whatever agreement was made between the student and instructor. All the fields are saved so reports can be run.

Now my client wants to add some "matrix logic" so that the Fee field is auto populated based on the LessonType and Intructor fields. For example the Fee field logic would go something like:
If Instructor = "Ann" and LessonType="30 Min" populate Fee with $15.00
If Instructor = "Kate" and LessonType="1 hour" populate Fee with $60.00

and the 'If Instructor and LessonType' logic would be quite long as they have many Instructors and many LessonTypes. Could be as much as 30 IF lines.

How would I go about making this happen?
Thx Experts...BobR
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Here's a picture of multi-field unique index.  Give the index a name and set the unique property to Yes.  On the second and subsequent lines  (up to 10 total), leave the Index Name blank.  That tells Access that each field is part of the previously named index.
UniqueIndex.PNGOtherIndex.PNG

Author

Commented:
I guess I am way over my head on this one PatHartman. I will take your suggestion and start another ticket with my new database. Thank you for all your help thus far.

Author

Commented:
Thanks so much

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.