Cannot find record only if I run Unmatched need more....

  • Thread starter Thread starter Vincent
  • Start date Start date
V

Vincent

I have two related tables linked by and InvoiceID as the
primary key for one table and a foreign key for the other
table.

I have made a form and subform. I set both keys to be
required.

My PROBLEM is I noticed that users can fill in all
required fields for the first Main form but can choose to
close the application and allows it to save information on
main form only.....

I noticed I CANNOT retrive the main when I query via
InvoiceID anymore. I can only find them if I running an
UNMatched Query. Is there any way were I can set it up so
I ask the users to go back themselves via query InvoiceID
search and have them finish the subform (FORM and SUBFORM
VIEW!!!)???
 
You need to use what's called an outer join. In the query window,
double-click the line joining the two tables and select the option that
includes all the records from the main table.

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
I have two related tables linked by and InvoiceID as the
primary key for one table and a foreign key for the other
table.

I have made a form and subform. I set both keys to be
required.

My PROBLEM is I noticed that users can fill in all
required fields for the first Main form but can choose to
close the application and allows it to save information on
main form only.....

This is correct. In fact, the instant you set focus to the subform it
saves the mainform record - it *has* to do so, otherwise there would
be nothing in the table with the new InvoiceID for the subform records
to link to.
I noticed I CANNOT retrive the main when I query via
InvoiceID anymore. I can only find them if I running an
UNMatched Query. Is there any way were I can set it up so
I ask the users to go back themselves via query InvoiceID
search and have them finish the subform (FORM and SUBFORM
VIEW!!!)???

Sounds like you're basing the mainform on a Query linking the Invoice
table to the related table, with an inner join. Don't! Base the
mainform *just* on the Invoice table (so it will show all invoices,
with or without detail records) and the Subform just on the related
table.
 
Back
Top