Solved A Main form does not display data when subform left blank (1 Viewer)

OverSight

New member
Local time
Today, 08:27
Joined
Jul 29, 2021
Messages
18
I am having an issue where one of my main forms will not display or populate data until a subform is populated.

This is a Vendor database with contact information. The main form frmVendorsDetails contains all contact information of the vendor. within this form is a subform frmVendorPOCs subform that contains the specific point of contact details for the vendor. If I populate both the main form and the subform all works well, but if I only populate the main form and I do not enter anything in the subform, the Main form will not display any information.

I do have a one-to-many relationship with tblVendors and tblVendorPOCs.

When I save the record, all of the info from the main form populates tblVendors but if the subform isn't filled out it there is never a record created in tblVendorPOCs and seems to cause this issue.

I would like the main form to display even if there is no point of contact filled out in the subform as some of the data will be populated in the future or the vendor does not have a specific point of contact.
 

Attachments

  • frmVendorDetails (Full).png
    frmVendorDetails (Full).png
    57.9 KB · Views: 314
  • frmVendorDetails (POC Blank).png
    frmVendorDetails (POC Blank).png
    58.5 KB · Views: 261
  • frmVendorDetails Blank (after save).png
    frmVendorDetails Blank (after save).png
    41.5 KB · Views: 443

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:27
Joined
May 7, 2009
Messages
19,233
are you using Query with Inner Join?
if so, use Left join:

select tblVendors.*, tblVendorPOC From tblVendors Left Join tblVendorPOC
On tblVendor.[Vendor Number] = tblVendorPOC.[Vendor Number]
 

OverSight

New member
Local time
Today, 08:27
Joined
Jul 29, 2021
Messages
18
are you using Query with Inner Join?
if so, use Left join:

select tblVendors.*, tblVendorPOC From tblVendors Left Join tblVendorPOC
On tblVendor.[Vendor Number] = tblVendorPOC.[Vendor Number]
Hey there, Yes you are right it was showing Inner Join! Thank you very much for this! I think this is now working!
 

Users who are viewing this thread

Top Bottom