Quer returns no records

  • Thread starter Thread starter Dick
  • Start date Start date
D

Dick

Good Day....

My situation is one where I have a form open consisting of only 1
table. I included a "button" on it to open a subsequent form and
subform that contains related child records (one to many relationship).
My VBA code works great as long as there are child records. If there
are no child records then the subform does not get displayed - just a
gray box. I would like to do a check to see if the query returns no
records and then open a blank subform to create a new record.

I can't seem to find the right code to make this work.

Thanks.....
 
What's the RecordSource for the form being used as the subform?

If it's a query that joins the two tables, make sure you use Left Join,
rather than Inner Join, in the query.
 
Back
Top