On Mon, 5 Nov 2007 21:38:01 -0800, Tom Ventouris
<(E-Mail Removed)> wrote:
>I have a Relationship between two tables. TableOne holds the client data.
>TableMany holds the InvoiceData. Referential Integrity enforced.
>
>InvoiceForm based on a query with data from the two tables, linked by
>ClientNumber from TableMany.
>
>When an invoice is created, the user enters ClientNumber and the client
>details appear. My question is about creating an invoice for a client not in
>TableOne. Is there some way to have the Client Record in TableOne created if
>it does not already exist, without opening the Client Data Input Form? Just
>the ClientNumber Field needs to be populated, all other Fields are on the
>Invoice Form (from TableOne) and can be filled in if the ClientNumber in the
>TableOne exists.
>
By far the simplest way to do this is to *NOT* base your Invoice Form on a
query joining the two tables; instead, use your Client Data Input Form with a
Subform based on the invoice table. Use the ClientID as the master/child link
field to automatically populate the client number, and put a combo box or
other appropriate search tool on the master form to find the desired client
record (or jump to the new record if it's a new client).
John W. Vinson [MVP]
|