Connecting Tech Pros Worldwide Forums | Help | Site Map

Update Using Form and Another Table

Dreamerw7
Guest
 
Posts: n/a
#1: Nov 13 '05
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.


Phil Stanton
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Update Using Form and Another Table


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" <dreamerw7@yahoo.com> wrote in message
news:1119998029.806748.74030@g47g2000cwa.googlegro ups.com...[color=blue]
> 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.
>[/color]


Closed Thread


Similar Microsoft Access / VBA bytes