Change in form field is refected in wrong table

A

Aldo

Hi guys,

I am working on MS Access 2007. I am new to access.
I have two tables, as described below:

Table "People" with the fields:
PeopleID - Automatic Number
FirstName - Text
LastName - Text
SexID - Integer

Table "Sex" with the fields:
SexID - Automatic Number
SexDes - Text

I did not create any relationship between the tables.

I have the query "PeopleSex" as follows:
SELECT
People.LastName, People.FirstName, Sex.SexDes, People.PeopleID,
People.SexID
FROM People LEFT JOIN Sex ON People.SexID=Sex.SexID
ORDER BY People.LastName, People.FirstName;

And the query "GetSex" as follows: SELECT Sex.SexDes FROM Sex;

I need to create a Form that allows me to insert / update:
LastName, FirstName, SexDes
SexDes must be combo box (with the options existing in table "Sex").

I succeded creating the form (based on the query), but when changing the sex
for a specific record, the change is reflected in "Sex" table, instead of in
"People" table.

What I am missing?
Thanks in advance,
Aldo.
 
K

KARL DEWEY

A combo has connection to two tables (usually via queries).
It get data from table by way of Row Source and stores/display to/from
Control Source.
Do you have your combo connected correctly?
 
A

Aldo

my combo box "SexDes" is bound as follows:
Control Origin: "SexDes", that is a field of the query that gets info from
both tables.
Row Origin: "SELECT Sex.SexDes FROM Sex".
The form is based on the following query:
SELECT
People.FirstName,
Sex.SexDes,
People.SexID
FROM People LEFT JOIN Sex ON People.SexID=Sex.SexID;

Thanks for any help,
Aldo.
 
A

Aldo

my combo box "SexDes" is bound as follows:
Control Origin: "SexDes", that is a field of the query that gets info from
both tables.
Row Origin: "SELECT Sex.SexDes FROM Sex".
The form is based on the following query:
SELECT
People.FirstName,
Sex.SexDes,
People.SexID
FROM People LEFT JOIN Sex ON People.SexID=Sex.SexID;

Thanks for any help,
Aldo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top