473,399 Members | 4,177 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,399 software developers and data experts.

Updating field, Form to Table

I wish to type in a number in my "Code" field, for instance 1060, I
then wish the number 1060 to trigger an event that will fill in the
next field (township field) For instance, 1060 brings up and fills in
name "Spencer Tp". I have 30 townships,2 cities, 6 villages and
identifiers consisting 38 separate code numbers assigned by our county
government to identify each township,city and village.

I ran a "Make Table Query", have created a separate table called
CodeID, using the "tblRegister" table. Used the NoDuplicates in query
properties, have the list sorted properly etc.

I link the two tables together as a 1 to many, the tblRegister being
the "Many" and the CodeID the "One". Using the "Item" column (tp.
assigned numbers)as the indexed foreign key, no index on same field in
tbleRegister, all works well. I open the form, open properties and
select the linked table query as a source.

In the query, I use all fields from the linked tblRegister table,
EXCEPT the two (2)existing in linked table "CodeID", inserting them in
the query list where needed from the linked "CodeID" table, the query
runs well as expected.

Opening the form, and using the linked table query as "source" the
form acts and runs perfect.

I type in Code field "1060", the Township field fills with "Spencer
TP". JUST FINE! EXCEPT!! WHEN I LOOK AT THE TABLE, all information
put in the form is placed in the table as expected WITH THE EXCEPTION
of the "Field I want filled. "TOWNSHIP NAME FIELD",

The field is filled in the form but remains empty in the permanent
"tblRegister" table.

WHAT AM I NOT DOING, OR DOING WRONG? I worked with Paradox DOS in
years past and used a "Lookup" table and all worked real easy. I am
lost in this procedure. Will really appreciate help. At 78 years of
age, maybe I am getting to old. Thank you so much for your time and
effort.
Old Timer:
Nov 12 '05 #1
1 2557
jr*********@adelphia.net (Old Timer) wrote in
news:b6**************************@posting.google.c om:
WHAT AM I NOT DOING, OR DOING WRONG? You are doing nothing wrong, nor failing to do something. You just
need to understand a little bit of RELATIONAL database theory.
Essentially, that says that you keep the data from the lookup table
in the lookup table, and never put it into your main table. In your
case, the lookup is only one field, plus its reference ID. Imagine
if you also had 20 other fields referenced from that same ID. Your
table would get pretty messy.

Now having said that, if you really want to add the "township
name" to the main table, and not just the lookup ID, you need to
set up an event in the form to copy that data to the field.I
suggest that you use the Code afterUpdate event. You will need to
add the township name from the main table to your query, put it
into a hidden textbox,( you don't need to see it twice. Then in the
event I mentioned above you add the procedure that says, me.
<<nameofhiddenField>> = me.<<nameOfVisibleField>>

Bob Q.

I wish to type in a number in my "Code" field, for instance
1060, I then wish the number 1060 to trigger an event that
will fill in the next field (township field) For instance,
1060 brings up and fills in name "Spencer Tp". I have 30
townships,2 cities, 6 villages and identifiers consisting 38
separate code numbers assigned by our county government to
identify each township,city and village.

I ran a "Make Table Query", have created a separate table
called CodeID, using the "tblRegister" table. Used the
NoDuplicates in query properties, have the list sorted
properly etc.

I link the two tables together as a 1 to many, the tblRegister
being the "Many" and the CodeID the "One". Using the "Item"
column (tp. assigned numbers)as the indexed foreign key, no
index on same field in tbleRegister, all works well. I open
the form, open properties and select the linked table query as
a source.

In the query, I use all fields from the linked tblRegister
table, EXCEPT the two (2)existing in linked table "CodeID",
inserting them in the query list where needed from the linked
"CodeID" table, the query runs well as expected.

Opening the form, and using the linked table query as "source"
the form acts and runs perfect.

I type in Code field "1060", the Township field fills with
"Spencer TP". JUST FINE! EXCEPT!! WHEN I LOOK AT THE TABLE,
all information put in the form is placed in the table as
expected WITH THE EXCEPTION of the "Field I want filled.
"TOWNSHIP NAME FIELD",

The field is filled in the form but remains empty in the
permanent "tblRegister" table.

WHAT AM I NOT DOING, OR DOING WRONG? I worked with Paradox
DOS in years past and used a "Lookup" table and all worked
real easy. I am lost in this procedure. Will really
appreciate help. At 78 years of age, maybe I am getting to
old. Thank you so much for your time and effort.
Old Timer:


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
6
by: cyoung311 | last post by:
I'm trying to do an automatic update of one table from another through a form. Basically, when a selection is made for an item, in this case a particular workshop, I want to get the associated...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
2
by: Ray Holtz | last post by:
I have a form that shows a single record based on a query criteria. When I click a button it is set to use an append query to copy that record to a separate table, then deletes the record from the...
9
by: hrreece | last post by:
I have an Access 2002 database that has a form that can be used to review individual records. At the bottom of the form are buttons that are linked to functions that allow the user to "Find a record...
0
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
4
by: AlexNunley | last post by:
I've adopted a moderately sized (65k records) active use database (Access 2000, Windows XP). One of the most commonly used forms is whats called the RMA generation field, used to add claim...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.