469,329 Members | 1,420 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,329 developers. It's quick & easy.

Update Using Form and Another Table

Hi,

I know this is probably a dumb question, but here goes:

I have 3 tables:

REGION
REG_ID
REGION

LOCATION
LOC_ID
REGION
LOCATION

EMPLOYER_FIELDS
employee_id
location
region

I need to create a form that will update the employer fields.

I created a form based on a general query of the table, put the fields
and several buttons. There are 2 fields, however that need to be combo
boxes that lookup values and then update the employer_fields table.

I need the location to be updated only for it's specific region. I
used 2 combo boxes and can get them to do this, but they get their
values from the 2 lookuptables (and not the table that is being
updated) and I need to take those 2 values selected and when the add
button or save button is pushed (those are on the form already), the
record on the employer_fields table is updated with the values chosen
from the comboboxes in the form.

Any ideas?

Thanks.

Nov 13 '05 #1
1 1481
I suspect that your table layout needs re-thinking.
The Regions table is fine

the Locations table should have (Assuming that there are number of Locations
in each region - in the UK we have lots of towns in a county)
LocationID
Location
RegionID

The Employers table should have
EmployerID
EmployerName
etc........
LocationID

On the Employer form you then need a single combo box to pick the Location
and as that location already has a region associated with it, the region
will be displayed

HTH

Phil
"Dreamerw7" <dr*******@yahoo.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Hi,

I know this is probably a dumb question, but here goes:

I have 3 tables:

REGION
REG_ID
REGION

LOCATION
LOC_ID
REGION
LOCATION

EMPLOYER_FIELDS
employee_id
location
region

I need to create a form that will update the employer fields.

I created a form based on a general query of the table, put the fields
and several buttons. There are 2 fields, however that need to be combo
boxes that lookup values and then update the employer_fields table.

I need the location to be updated only for it's specific region. I
used 2 combo boxes and can get them to do this, but they get their
values from the 2 lookuptables (and not the table that is being
updated) and I need to take those 2 values selected and when the add
button or save button is pushed (those are on the form already), the
record on the employer_fields table is updated with the values chosen
from the comboboxes in the form.

Any ideas?

Thanks.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sue Adams | last post: by
4 posts views Thread by shank | last post: by
3 posts views Thread by PAUL EDWARDS | last post: by
5 posts views Thread by A.Dagostino | last post: by
9 posts views Thread by Dom Boyce | last post: by
5 posts views Thread by Stephen Plotnick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.