View Full Version : Tabbed Form with Subform Query Issue - Help Please...


ho2k7
07-01-2009, 12:54 AM
Hi All,

I have setup a database with multiple tables all linked by the 'TN Number' and one mainform which has a tabbed control which then has multiple subforms on. Because there is no information entered into the subform a record is not created which then affects my query which shows no results (explained below).

I have setup a query which takes many fields from the main 'enquiry table' and one field from the 'sales order table', I would like the query to show results if there is no 'sales order number' which is the one field taken from the 'sales order table' as no information is entered into the subform to create a record no data is shown even when these is no 'sales order number'. I am using the Is Null in criteria but even with no criteria entered no data is shown.

Could anyone please assist.

Thanks in advance. :D

Guus2005
07-02-2009, 07:08 AM
If you have multiple tables connected to each other by a single key 'TN Number', i doubt your database is normalised.

Suppose you have a table A with an ID field and a table B also with an ID field and you want to know which ID's you are missing in table B:

select * from A left join B on A.ID = B.ID where B.ID is null
According to your description you already have something like this. Perhaps you switched A and B?

HTH:D