473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1683
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sue Adams | last post by:
I actually have two issues/questions: I have an autonumber field in an access db table that I grab and later use to update a record in another table withing the same db. The code I use to get...
4
by: shank | last post by:
Visually, the page will look somewhat like a spreadsheet. It could have hundreds of records (rows) displayed. I want to enable the user to edit any one or any number of records and any fields, then...
3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
5
by: A.Dagostino | last post by:
hi i need to update an SQL Table when user select or unselect a checkbox control. How Can i do? Thanks Alex
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
4
by: N. Graves | last post by:
Hello... thank you for your time. I have a form that has a List box of equipotent records and a sub form that will show the data of the equipment select from the list box. Is it possible to...
1
by: SuffrinMick | last post by:
Hi All I have two tables: tblRecords and tblOptions. tblRecords consists of RecordID (autonumber), Record (text) and Option (text record of options chosen) fields tbloptions consists of...
5
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.