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

Updating field, Form to Table

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


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.