subform update

S

smk23

I have a subform whose recordsource is a query with two tables:

SELECT c.ClientID, c.PhoneID, p.PhoneID AS PPhoneID, p.PhoneNum, p.Comment
FROM ClientPhone c INNER JOIN Phone p ON c.PhoneID=p.PhoneID

The backend is SQL 2k and the sub is linked to the main form on ClientID.
PhoneID is the PK of the PHone table.

If I edit an existing record and then try to add a new record, I get an
error "Jet engine can't find record in Phone with matching field PhoneID. I
can't fix this with Me.Requery or anything. I have to exit the form and
re-open. I can then add my new record. I can add as many records as a I want
as long as I don't edit an existing record. How can I fix this weird behavior?
 

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