Fail to create related records

I am building a purchase order tracking system. I want to have a table all the POs, with a one-to-many relationship to a table with the individual items in a PO. I have two tables, purchases and reqitems, with the following file in .../tables/purchases:
[bill of materials]
__sql__ = "SELECT * FROM reqitems WHERE reqid = '$reqid'"
reqid is a field in each table, and is indexed in each table.
In the Xataface interface, the 'bill of materials' comes up correctly for a record in purchases, and I am offered the opportunity to insert a new record. However, whenever I fill in the fields and hit Save, the input screen clears, and no record is created.
Anyone have an idea what might be wrong?
thanks,
James
[bill of materials]
__sql__ = "SELECT * FROM reqitems WHERE reqid = '$reqid'"
reqid is a field in each table, and is indexed in each table.
In the Xataface interface, the 'bill of materials' comes up correctly for a record in purchases, and I am offered the opportunity to insert a new record. However, whenever I fill in the fields and hit Save, the input screen clears, and no record is created.
Anyone have an idea what might be wrong?
thanks,
James