Entering data on more than 1 table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We are designing a database for fire hydrants. When I enter the hydrant
serial number and location, I want access to automatically enter this data in
the maintaince table and flushing order table. How can I achieve this task?
Thank you for your attention to this matter.
 
When I enter the hydrant
serial number and location, I want access to automatically enter this data in
the maintaince table and flushing order table.

well, normally you wouldn't. following the rules of data normalization, you
would list the location of each fire hydrant only once - presumably in a
table that lists all hydrants that your station (?) is tracking. assuming
that the serial number of each hydrant is unique, that field can serve as
the Hydrant table's primary key. to link the records in another table to
specific hydrant records, you would add the HydrantSerialNumber field to the
other table as a foreign key, join the two tables on that common field in
the Relationships window, and enforce referential integrity. you can put
both tables in a query any time that you want to show the hydrant location
in combination with data from a related table.

also, usually when you add records to a "parent" table such as Hydrants, you
don't *automatically* add a record to a "child" table such as Maintenance.
you only add a record to a child table when you need to record data that is
specific to that table. and you normally do not enter any data directly into
a table via datasheet view - you enter data via forms.

can you explain your table/relationships in a bit more detail, as well as
what you want to accomplish, so we can suggest a workable solution (or two,
or three)?

hth
 
The database is called Fire Hydrants. In the database we have a table called
Location Information, Flushing Order, and Maintaince. We have created forms
for each of the tables. The Location Information is the main table and form
with the serial number being the primary key. When I enter a new location is
there a way for access to put the serial number in the maintaince table and
the serial number and location in the flushing order.The reason for the
serial number and the location in the flushing order is to be able to print a
list of hydrants in order of flush from the water tower to the end of the
water line. Could there be an easier way to get the end result for maintaince
files and flushing order.
 
okay. we can figure this out, but you'll need to educate me a little more on
the "water tower to end of line" thing. do you have more than one water
tower to deal with? is there only one "flushing line" from a single water
tower: hydrant a to hydrant b....to hydrant z? or does a single water tower
have mutiple "flushing lines" - like spokes in a wheel, with the water tower
being the hub, and each "spoke" being a line of hydrants a to z?
 
Okay each water tower has 4 flushing orders and we have 4 water towers for a
total of 16 different flushing orders on multiple lines. Each water tower
supplies a certain section of town. In these 16 flushing orders we have
approx 650 fire hydrants. when the guys flush these hydrants they aren't
flushed in serial number order but in order of where they are located from
each water tower.they may flush hydrant #342 before they flush # 65. The
hydrant # is assigned by the water dept so we have no control over wheather
the numbers are in line with each other or not. IE #82 is at Hospital Drive
and Hwy 103. #537 is 500 feet from Hwy 103 on Hospital Drive. There is no
rhyme or reason to the numbering system. Hope this helps. Bryan
 
okay, we're getting somewhere. is each of the 650 hydrants in only 1 of the
16 flushing orders? also, if you flush "order" 12 (for instance), does it
always involve the same specific hydrants; and if you flush "order" 7, it
only involves its' specific hydrants, etc?
 
I just want to offer a word of encouragement here. It may look like Tina is
asking an endless series of questions, but if you stick with it you will see
where she is going with this. It may take a while to set up, but I expect
you will be pleased with the results.
 
Back
Top