Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Subform Does not read recordset

Posted on 2013-10-23
2
Medium Priority
?
411 Views
Last Modified: 2013-10-24
Hello Experts,

I have the following query qryDiscrepancies

SELECT tblReservations.*
FROM tblReservations
WHERE (((tblReservations.fldTripSubType)=[Forms]![frmDiscrepDetails]![txtTripID]));

Open in new window


Here frmDiscrepDetails is a parent form and with in it I have a subform, whose record source = qryDiscrepancies

However, when I load the parent form, the subform is empty, but while the parent form is still loaded if I run qryDiscrepancies I get the needed records in the query view, but never in the subform.

What am I doing wrong?
0
Comment
Question by:APD_Toronto
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39596018
try removing the criteria in your query "qryDiscrepancies"

SELECT tblReservations.*
FROM tblReservations

then set the Master/Child Link property of the subform to

Master TripID
Child     fldTripSubType

you are not getting any records because the subform is loaded first before the main form..

or you can add a requery for the subform in the load event of the main form
0
 

Author Closing Comment

by:APD_Toronto
ID: 39597865
Thank you!
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question