Getting multiple values from a dropdown box into other fields in a Form

Shooting Star

Registered User.
Local time
Today, 11:25
Joined
Dec 22, 2008
Messages
15
Hi, I'm pretty new to Access and to how it all works, and I have a problem.

For my coursework, I have to design a database which includes customers, staff, and product tables. I've done all of that.

I am required to produce a form that will act as a job sheet, so hypothetically, if a sales rep was to add a new job into the database, he could do so from the form.
I need to include Customer Name, Customer Address and Telephone number when entering data into this form, but I want to get this information from the existing Customer Table.

I figured the best way to do this was to get the data from a dropdown box which includes each record from the Customer Table. However, when I select a record from the dropdown box, access only stores one value from the record in one field in the form (e.g. customer forename).

I want to be able to select from the dropdown box a record, and for access to place each individual value into a different field in the form, so when I select a customer record from the dropdown box, access automatically puts each value into each different field.

I hope this makes sense and is clear enough. If you would like a screenshot of my database in order to clear things up, I can provide you with one.

Thanks in advance for any help I receive. I'm pretty much a novice when it comes to Access, so I need all the help I can get, lol. :) By the way, I'm using Access 2007.

- Steven.
 
use the combobox wizard. It will allow you to select a record from a query that you have and automatically go to that record
 
You have to select the columns in the dropdown box, once there, visible or no... you can find them

YourCombox.Columns(0)
will retrieve the first (usually bound) column,

YourCombox.Columns(1) column 2, etc.

P.S. Welcome to (one of ;) ) the best Access forums on the net
 
Thank you both for your help! I'll try out both of them.

Namliam, where would I enter that piece of coding? Sorry if I sound a bit dumb. :p Thanks for the welcome as well!
 
In the same place where you are now getting the 'one value'
 
Thank you so much for your help, it worked. :D

I have one problem though. The values show once I put the piece of coding that namliam suggested, but they don't update the table in question. This means that when I try to create a report, these values don't show, as they haven't been added to the table, although I have input them in the form.
Does anyone have any idea why this is happening?
 
Well your data wouldnt be in the table, and should not be....

You have the table, on which the combo is based, where the data is stored. Add/Join that table to your report to get the data to display (again).
 

Users who are viewing this thread

Back
Top Bottom