Two table with same child table

N

need help

I have an ‘Order’ Form which has a subform ‘Freight Detail’ table where I
enter details of freight (cartons, pallets etc) for each order.

I have also created another form ‘Freight Invoice’ which has a same subform
‘Freight Detail’ table.
Using this form (when I get the invoice from transport company) I want to be
able to apply the details of the freight (which I entered using ‘Order’ form)
to the ‘Freight Invoice’ table.

So [Freight Detail] is a sub form of two separate forms.

[Order] --> [Freight Detail] <-- [Freight Invoice]
Order # Order #
Con note
F Invoice F Invoice

But when I try to pull up freight detail data (using various methods like
combo box etc) In the 'Freight Invoice' Form it comes up with message “Cannot
change record because related Record is required in 'Order'â€. I think I am
having trouble because the [Freight Detail] is already a child/subform of
Order table that has data in it .

One Order can have multiple freight details (connote) &
One Invoice can have multiple Freight details (con note)

Is there any around this problem. Thanks
 
S

strive4peace

"“Cannot change record because related Record is required in 'Order'"

Remove the Default Value of OrderID in the Freight Invoice table.
Access automatically uses zero for the default value of numeric fields.
If you have not filled an order out and, therefore, have no OrderID,
Access is giving it a zero -- and it isn't matching up ...

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
N

need help

Thanks Crystal

There is already data in the [Freight Detail] table with relevent order #.
The [Freight Detail] also has 'F Invoice' field (to relate the [Freight
Detail] to the [Freight Invoice] table)which is blank as it is going to be
filled later.

The problem occurs when I try to pull up data from freight detail table and
relate it to freight invoice table.

Order] --> [Freight Detail] <-- [Freight Invoice]
Order # (P) Order #
Con note (P)
F Invoice F Invoice (P)

I want to be able to extract existing data from [Freight Detail] table and
relate them to [Freight Invoice] table.

Much Appriciate your help.
 
S

strive4peace

Hi need help (what is your name?)

Sorry for the delay, I was out of town.

Are you using the [Freight Detail] table as the RecordSource for your
form or are you using a query? If a query, what is the SQL (View, SQL
from the menu)

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*




need said:
Thanks Crystal

There is already data in the [Freight Detail] table with relevent order #.
The [Freight Detail] also has 'F Invoice' field (to relate the [Freight
Detail] to the [Freight Invoice] table)which is blank as it is going to be
filled later.

The problem occurs when I try to pull up data from freight detail table and
relate it to freight invoice table.

Order] --> [Freight Detail] <-- [Freight Invoice]
Order # (P) Order #
Con note (P)
F Invoice F Invoice (P)

I want to be able to extract existing data from [Freight Detail] table and
relate them to [Freight Invoice] table.

Much Appriciate your help.



strive4peace said:
"“Cannot change record because related Record is required in 'Order'"

Remove the Default Value of OrderID in the Freight Invoice table.
Access automatically uses zero for the default value of numeric fields.
If you have not filled an order out and, therefore, have no OrderID,
Access is giving it a zero -- and it isn't matching up ...

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 

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