View Single Post
  #15  
Old November 12th, 2009, 11:57 PM posted to microsoft.public.access.tablesdbdesign
deb
external usenet poster
 
Posts: 898
Default how to handle meter readings

i did that, on the combo box on the main form the row source is

SELECT [ElectricityMeter].[ElectricityMeterID],
[ElectricityMeter].[MeterNumber] FROM ElectricityMeter ORDER BY
[MeterNumber];

the record source for the main form is ElectricityMeter

on the sub form the source object is MeterReading
link child and master are ElectricityMeterID

the ElectricityMeter table has
ElectricityMeterID (link field)
MeterNumber
BuildingID
LocationID

the MeterReading table has
MeterReadingID
ElectricityMeterID (link field)
ReadingDate
PeakReading
OffPeakReading

linked with enforced referential integrity

so you select the meter number from the combo box, fill in the date and
readings - all good except its not picking up the ElectricityMeterID in the
MeterReading table

what am i missing?





--
deb


"BruceM via AccessMonster.com" wrote:

If you have a meter table and a related readings table, with a form and
subform for data entry, you can use an unbound combo box on the main form to
select a meter. The wizard can get you started on that. Once the meter is
selected Access will go to that record, where you can enter or view Readings
records.

You can use a spreadsheet to import many Readings records all at once. If
the meter number is unchanging you probably could use that rather than
autonumber as the linking field between the two tables. If you put together
a simple database with a few sample records you can see how the data will
look in the tables, and plan accordingly. The main point is that a linking
field is needed to associate a reading with a meter. Your import from Excel
will need to include that field. If using the meter number is not practical
there are other ways, but I won't get into that just now.

My question about the meter number changing was with the idea that meters
will break down or become damaged, and will need to be replaced. Will the
new meter have the same meter number as the old? If so, no problem. If so,
you may need to make provisions for continuity.

deb wrote:
yep, but i think i'm too damn cheap for this much stress!
every time i hand them one
feature they get all excited and add something else (3 week job is now

[quoted text clipped - 3 lines]

Just so it's billable hours...


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200911/1

.