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

Update Using Form and Another Table

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.