Looking for help with the proper event(s) and VBA to display tables rows (one-to-many) on a subform that is on a tab page.
We are able to do data entry of information via the subform but not able to view pre-existing table rows.
Background Information:
- Able to view the previously entered information when viewing the table and the primary key on the table is an AutoNumber field.
- Unsuccessful with Form's Load event with VBA
Me!TabCtl0.Pages!PhoneLog!subfrmInspPhoneLog.Requery
Reasoning for VBA in Load event instead of the Open event
is the VBA reference for Event model stating that the subform
and its data are loaded before the main form.
- Tab control properties Other/Name = TabCtl0
- Tab page properties Other/Name = PhoneLog
- Subform's Form's properties Data/Record Source =
SELECT tblInspPhoneLog.IndexID, tblInspPhoneLog.VID,
tblInspPhoneLog.Date, tblInspPhoneLog.CallTime,
tblInspPhoneLog.OwnerTelNbr,
tblInspPhoneLog.TenantTelNum,
tblInspPhoneLog.InspectionCode, tblInspPhoneLog.Notes,
tblInspPhoneLog.Initials FROM tblInspPhoneLog WHERE
(((tblInspPhoneLog.VID)=
Form!frmViewNewTenantByVoucherNum!tblInspHCMain.ID))
ORDER BY tblInspPhoneLog.IndexID DESC;
Thank you for any help with the above.
We are able to do data entry of information via the subform but not able to view pre-existing table rows.
Background Information:
- Able to view the previously entered information when viewing the table and the primary key on the table is an AutoNumber field.
- Unsuccessful with Form's Load event with VBA
Me!TabCtl0.Pages!PhoneLog!subfrmInspPhoneLog.Requery
Reasoning for VBA in Load event instead of the Open event
is the VBA reference for Event model stating that the subform
and its data are loaded before the main form.
- Tab control properties Other/Name = TabCtl0
- Tab page properties Other/Name = PhoneLog
- Subform's Form's properties Data/Record Source =
SELECT tblInspPhoneLog.IndexID, tblInspPhoneLog.VID,
tblInspPhoneLog.Date, tblInspPhoneLog.CallTime,
tblInspPhoneLog.OwnerTelNbr,
tblInspPhoneLog.TenantTelNum,
tblInspPhoneLog.InspectionCode, tblInspPhoneLog.Notes,
tblInspPhoneLog.Initials FROM tblInspPhoneLog WHERE
(((tblInspPhoneLog.VID)=
Form!frmViewNewTenantByVoucherNum!tblInspHCMain.ID))
ORDER BY tblInspPhoneLog.IndexID DESC;
Thank you for any help with the above.