G
Guest
Using code I add a customer to the CUST table via code manipulation of
Forms("Customers").
ie using code I open the form, go to a new record, fill in some values AND
then REFRESH the form to write the data to the table.
Further down in the code I want to add some products to the CUSTPRODUCT
table via DAO code ie using CUSTPRODUCT.ADDNEW....CUSTPRODUCT.UPDATE for that
customer.
The and CUST and CUSTPRODUCT tables are related by the customer number (a
classic situation) and CUSTPRODUCT is dependant on a record being in the CUST
table first.
So when CUSTPRODUCT.UPDATE is executed it falls over, stating that a related
record is required in CUST.
The problem is that the record IS there 100%. I pause the code just before
the UPDATE, open the CUST table and it is there alright.
Why cannot the code 'see' the record created by Forms("Customers").Refresh
Forms("Customers").
ie using code I open the form, go to a new record, fill in some values AND
then REFRESH the form to write the data to the table.
Further down in the code I want to add some products to the CUSTPRODUCT
table via DAO code ie using CUSTPRODUCT.ADDNEW....CUSTPRODUCT.UPDATE for that
customer.
The and CUST and CUSTPRODUCT tables are related by the customer number (a
classic situation) and CUSTPRODUCT is dependant on a record being in the CUST
table first.
So when CUSTPRODUCT.UPDATE is executed it falls over, stating that a related
record is required in CUST.
The problem is that the record IS there 100%. I pause the code just before
the UPDATE, open the CUST table and it is there alright.
Why cannot the code 'see' the record created by Forms("Customers").Refresh