Populate Form fields based on selection in another field

Hey Lucy

Registered User.
Local time
Today, 04:59
Joined
Jan 20, 2012
Messages
124
I am having a serious mental block when it comes to this. I know I've done it before, but I can't seem to find the old file to look at.

Before responding, please keep in mind that I do not know VB, but can insert VB code when written for me (bad girl! bad girl!)

So, here goes. I have a Customers table and an Orders table. My Customers table is a bit different than the norm because I couldn't figure out any other way to do this.

My client's customers are either businesses (companies) with a contact person, or individual customers. So, in the Customers table, I have the following fields (there are others but do not apply to my problem):

Customer ID
Company
Contact
Customer

So, if it is a company the data entry person would enter the company name and the full name (EX: Doe, John) in the contact field, but if it is an individual customer, then they would leave Company and Contact blank and enter just the Customer name (Ex: Doe, Jane).

So, in the Orders table, I have combo boxes for look ups for the fields Company and Customer.

That works okay, but I would really like for the Customer ID to post into a text box once the Company or Customer has been selected. In other words, the input person would enter the name, then it would show that Customer's ID #.

Can this be done this way? I am feeling like I HAVE pulled this off before but like I say, having serious mental block.

Once this problem is solved, I have another concerning the Orders form also, but I will save it for after I get this working the way I need.

All help is appreciated! You guys/gals are great in supporting other Access programmers!!:banghead:
 
try, Me.Requery in the after update event of the customer and the company text box.


Dale
 

Users who are viewing this thread

Back
Top Bottom