D
Dave
I have an adp project that I upgraded from an Access mdb database.
In my project I have a form and a sub form that represents a parent and
child relationship, say orders and parts. The order form contains a subform
whose control source is a query against the orderparts and parts table. The
query returns the orderid and the partid from orderparts table (junction
tabble) and the part name from the parts table.
I drag and drop the orderparts form on to the order form and I set the link
child fields and the link master fields on the orderid.
This works fine and as I navigate through my orders in this form I see all
of the associated parts in the orderparts subform.
However, when I try to add a new part to an order in the form, it freezes. I
get an error message that says "MS Access can't find object 'SELECT partid,
partname FROM part'.
I can change an existing part on an order from the sub form but I cannot add
a new part.
What am I doing wrong?
The orderparts table contains 3 fields: orderpartid, orderid, partid. The
primary key is a composite of orderid and partid. The recordset for the
orderpart form is: SELECT op.orderid, op.partid, p.partname FROM part p JOIN
orderpart op ON op.partid.p.partid There is a composite PK on the
orderpart table of orderid-partid.
Why can't I add a part to my order in the adp project? It worked in the
Access mdb before I upgraded?
In my project I have a form and a sub form that represents a parent and
child relationship, say orders and parts. The order form contains a subform
whose control source is a query against the orderparts and parts table. The
query returns the orderid and the partid from orderparts table (junction
tabble) and the part name from the parts table.
I drag and drop the orderparts form on to the order form and I set the link
child fields and the link master fields on the orderid.
This works fine and as I navigate through my orders in this form I see all
of the associated parts in the orderparts subform.
However, when I try to add a new part to an order in the form, it freezes. I
get an error message that says "MS Access can't find object 'SELECT partid,
partname FROM part'.
I can change an existing part on an order from the sub form but I cannot add
a new part.
What am I doing wrong?
The orderparts table contains 3 fields: orderpartid, orderid, partid. The
primary key is a composite of orderid and partid. The recordset for the
orderpart form is: SELECT op.orderid, op.partid, p.partname FROM part p JOIN
orderpart op ON op.partid.p.partid There is a composite PK on the
orderpart table of orderid-partid.
Why can't I add a part to my order in the adp project? It worked in the
Access mdb before I upgraded?