473,569 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1701
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*******@yaho o.com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.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
2771
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 it from the db table is: ''Retrieve the Registration Identification Number strRegisterID = Rs("Register_ID") Prior to testing my code and actually...
4
6126
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 click a save button to UPDATE the SQL table. I'd like to use stored procedures if possible. How is this done? Where do I start? thanks
3
2420
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 code it is 50% chance that the update will make it back to the dataset. If I update the dataset instead of the form, it does not show on the form....
5
2346
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
4337
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 predecessor, I hasten to add) so that each day it creates a copy of the record for each company, changes the date to today's date, and prompts the user...
4
26166
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 make a change in the name field in the details, then refresh the list box with new name? Please help and thanks!
1
2785
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 OptionID (autonumber) and Option (text) fields. I want to use a form to add/update the records table.
5
2587
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
7739
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 error appears. I will be editing records and then a random one will get the error. A bit of background on my form, this will seem a bit lengthy...
16
3478
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 renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.