HELP: Can't Link Main Form to Sub-Form

ASGIAnalyst

New member
Local time
Yesterday, 18:29
Joined
Jul 26, 2009
Messages
7
Hello,

Can someone please help me understand how to create a query that looks at the data in several combo boxes on a main form, searches a table for the criteria, and lists it in a sub-form? I've attached a blank database for reference. Here's what I've done so far:

  1. "Hedge Fund Search" is the main form which has 7 combo boxes all bound to the "Matrix Database" table.
  2. "Matrix Database Query 2" is supposed to run when the user clicks the "search" button on the sub-form.
  3. "Hedge Fund Search Sub-Form" is a sub-form that is supposed to list the results of a search based on the criteria chosen from the combo boxes in the main form.
For some reason I'm having the HARDEST time figuring out how to build a query that looks at data in the main form and lists the results in a sub-form. Please help!! Thanks!
 

Attachments

Your use of IsNull seems to be in error, it should be in the form IsNull(Expression), try;

Code:
IIf(Is Null([Forms]![Matrix Database]![HEDGE FUND NAME Text]) ,[HEDGE FUND NAME],[Forms]![Matrix Database]![HEDGE FUND NAME Text])
 
You might also want to consider implement a naming protocol to help easily identify your various Objects. Consider FRM_FormName, TBL_TableName, QRY_QueryName, RPT_ReportName. Avoid using spaces and other special caracheter in control and object names.
 
Thanks John Big Booty - I'll implement your suggestion tomorrow and let you know how it goes!
 

Users who are viewing this thread

Back
Top Bottom