Create "One" Record from the "Many" Table

G

Guest

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.
 
T

tina

include the ClientNumber field from TableOne (the primary key, i presume?)
in the query bound to InvoiceForm.

hth
 
G

Guest

Thanks Tina.

It is already there. I still get the error that the system cannot find a
matching record in TableOne.
 
J

John W. Vinson

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]
 
G

Guest

Thnaks

John W. Vinson said:
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]
 
?

???

John W. Vinson said:
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top