B
BruceM via AccessMonster.com
You would generally use an unbound combo box for searching. I can't tell if
you have done that, so I'm mentioning it. You say that part is working OK,
so I assume you have this set up correctly.
The subform is in a "box" on the main form. The box is the subform control.
Be sure its Link Child and Link Master properties are set to the linking
fields. To view the subform control property sheet, click the subform to
select it, then click View >> Properties. Be sure you are looking at the
control properties, which will be labeled something like Subform/Subreport:
ControlName. Click the three dots next to Link Child or Link Master. Access
will probably select the correct fields if the tables are properly related.
you have done that, so I'm mentioning it. You say that part is working OK,
so I assume you have this set up correctly.
The subform is in a "box" on the main form. The box is the subform control.
Be sure its Link Child and Link Master properties are set to the linking
fields. To view the subform control property sheet, click the subform to
select it, then click View >> Properties. Be sure you are looking at the
control properties, which will be labeled something like Subform/Subreport:
ControlName. Click the three dots next to Link Child or Link Master. Access
will probably select the correct fields if the tables are properly related.
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?
[quoted text clipped - 22 lines]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