Forms and multiple records on display

  • Thread starter Patrick Stubbin
  • Start date
P

Patrick Stubbin

Hope this makes sense.

I have to calibrate thermometers, and wish to store the data in a access
database. the issue is that I have a reference thermometer used to check all
working thermometers.

I have a table with the information of calibration for each thermometer and
the reference thermometer, I can test up to four working thermometers at a
time.

I wish to display on one page, up to 4 records of calibration data for the
working thermometers, for this set, there is only one set of data for
reference thermometer

viz

Form might look like:



reference thermometer Temperature
-------------------------------------------

therm 1 therm 2 Therm 3 therm 4
--------- --------- --------- ---------

reading1 Reading1 reading1 Reading1
reading2 reading2 reading2 reading2



it is like i think have a main form with for sub forms for the associated
thermometer record.. Then u goto to next record , it should then display the
following, for example:


reference thermometer Temperature
-------------------------------------------

therm 5 therm 6 Therm 7 blank as no record!!!
--------- --------- ---------

reading1 Reading1 reading1



remembering that all the above information is in one table

can anyone offer aassistance?
 
B

BruceM

Putting all of the information into a single table is probably not the best
approach. One approach would be for your main table (tblMain) to contain the
date, reference thermometer reading, and any other information specific to a
calibration session, and for another table (tblReadings) to contain
thermometer readings. tblMain needs a primary key (PK) field, and
tblReadings needs a corresponding field to be used as a foreign key (FK). If
the PK field is autonumber, the FK field needs to be number; otherwise the PK
and FK fields need to be the same data type. Data type is established in
table design view.
Go to Tools > Relationships to establish a relationship between the PK and
FK fields. Do this by adding both tables to the relationship, then dragging
the PK field on top of the FK field. Click Enforce Referential Integrity.
Make a form (frmMain) based on tblMain, and another (fsubReadings) based on
tblReadings. Set the default view of fsubReadings to Continuous. In form
design view, drag the icon for fsubReadings onto frmMain. Now you can add
any number of individual thermometer readings. Each thermometer reading is a
separate record in the tblReadings, and is related to one and only one record
in tblMain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top