By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Trouble With saving fields brought in using combo box.

P: n/a
Ok the complete story. I have a Contact Table, Query and Form, that
are used to input
and store the contact info for customers. They have FirstName, LastName

and Address as the primary key fields to keep out duplicates. I am
trying to put a full name box on the query, that uses the FirstName,
LastName and Middle Initial and puts them together to form a full name.
That I have so far. On my order database(consisting of a master table
with all the fields for order details, a master query that pulls all of
those fields into the query, and a form in which the query fields are
filled out. I made a combo box with the wizard that gets the full name
from the contacts query and stores it into B1(buyer1) Full Name field
in the Master Query. The trouble is that when it does this I want it to
pull the separate fields from the Contacts query(FirstName, Middle
Initial, LastName, etc, into separate B1 fields(named B1 First, B1
Middle Initial, B1 Last, etc.). I want to do this same thing for a
Buyer2 and 2 sellers, but getting their information from the contacts
query/table. Any Ideas????? i keep getting it to pull the full name,but
when i try relating the two queries to get the data, it wont allow me
to change the name in the combo box.
Thanks ahead of time for any help you can provide.

Jun 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Not clear what you are trying to do, but it sounds like you have a
master table and a detail table and you want to base something on the
data from these tables - a combobox? And the problem you are having is
in retrieving the desired dataset from these tables.

Based on what I understand about your problem, I would suggest you try
to create a query where you join your master and detail tables and see
what the result set is. If the problem is that you cannot join the
master and detail tables then the problem would be that you are trying
to mix apples with oranges - in which case the problem would be that the
data tables are not related - or not related correctly.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jun 16 '06 #2

P: n/a
I have a master order table which has a bunch of details about the
persons perchase. I need to pull a persons information from the contact
information query and insert that information into the similar fields
on the master order table. I use a combo box on the master order form,
to look up the persons full name from the contacts information query
and then save that full name to one of the following fields(B1 Full
Name, B2 Full Name, S1 Full Name, or S2 Full Name). However, I need it
to bring in the rest of the fields that correspond with that full name
and put them in the similar fields in the master order form and query.
I tried to relate the two, however, it will not let me change the
persons name in the combo box if i relate the B1 Full Name(on the
master order query) and the Full Name(field on the Contact information
query). Any ideas. they are the same data types and should work but
dont.
Rich P wrote:
Not clear what you are trying to do, but it sounds like you have a
master table and a detail table and you want to base something on the
data from these tables - a combobox? And the problem you are having is
in retrieving the desired dataset from these tables.

Based on what I understand about your problem, I would suggest you try
to create a query where you join your master and detail tables and see
what the result set is. If the problem is that you cannot join the
master and detail tables then the problem would be that you are trying
to mix apples with oranges - in which case the problem would be that the
data tables are not related - or not related correctly.

Rich

*** Sent via Developersdex http://www.developersdex.com ***


Jun 16 '06 #3

P: n/a
You should be able to set the Row Source of your Combo Box to a Query that
returns and displays the full name, but also has columns for first, middle,
and last names. You refer to those using the Combo Box's Column property
(which is zero based, so if you have 4 columns they are Column(0),
Column(1), Column(2), and Column(3).

You can't automatically store the selected value for more than a single
column by using the Combo's Control Source, so you'll have to do it with a
little VBA code, and possibly some Controls with their Visible property set
to False/No.

Example:

Me.cboPersonsName.Column(1)

Larry Linson
Microsoft Access MVP
<fs*************@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I have a master order table which has a bunch of details about the
persons perchase. I need to pull a persons information from the contact
information query and insert that information into the similar fields
on the master order table. I use a combo box on the master order form,
to look up the persons full name from the contacts information query
and then save that full name to one of the following fields(B1 Full
Name, B2 Full Name, S1 Full Name, or S2 Full Name). However, I need it
to bring in the rest of the fields that correspond with that full name
and put them in the similar fields in the master order form and query.
I tried to relate the two, however, it will not let me change the
persons name in the combo box if i relate the B1 Full Name(on the
master order query) and the Full Name(field on the Contact information
query). Any ideas. they are the same data types and should work but
dont.
Rich P wrote:
Not clear what you are trying to do, but it sounds like you have a
master table and a detail table and you want to base something on the
data from these tables - a combobox? And the problem you are having is
in retrieving the desired dataset from these tables.

Based on what I understand about your problem, I would suggest you try
to create a query where you join your master and detail tables and see
what the result set is. If the problem is that you cannot join the
master and detail tables then the problem would be that you are trying
to mix apples with oranges - in which case the problem would be that the
data tables are not related - or not related correctly.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Jun 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.