Subform on Tab page not displaying table rows

lleung

New member
Local time
Today, 11:33
Joined
Oct 21, 2003
Messages
6
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.
 
Thank you for replying.

No VBA was used to set the Record Source. The Record Source in the initial posting was generated from prompting upon placement of the Subform on the Tab page.
 
Not sure I fully understand what you are trying to do, why are you Requerying the form in the Load event, as for not being able to view existing records I suspect that you have the forms data entry set to yes
 

Users who are viewing this thread

Back
Top Bottom