Problem with jet database

O

Orlan

I keep getting the following message on a form when I try to edit it:

The Microsoft Jet database engine cannot find a record in the table
‘Personnel’ with key matching fields(s)’ ‘qryReceive.LastName’.

It will not let me go from form view to design view. I can get into design
from the database window but not directly from form view. The form contains
the field LastName, as does the underlying query. The query (qryRecieve)
joins two tables, tblRecieve and Personnel by "LastName".

Can anyone help me solve this issue?
 
O

OVJ

I get the message when I go from the form in form view to design view.
Opening the query itself does not give the message.

From the form view, if I do not enter a valid last name in the LastName
field, it gives me the message.
 
J

Jerry Whittle

joins two tables, tblRecieve and Personnel by "LastName".

Do you have more than one "Smith" or other duplicate last names? Right there
would stop the form from being editable. The LastName field needs to be the
primary key in at least one of those tables for this to work. You should
almost always join on a primary key field.

Even then it's usually best to have a form probably based on the Personnel
table and on that form a subform based on tblRecieved. Or maybe the other way
around. Form/subform works better than a query when putting two tables to be
editied on a form rather than a query that joins those two tables.
 
O

OVJ

I think Ken Sheridan's comment about unsaved data solves the immediate
problem. I will have to work on the last name issue. I use it to bring up an
email address so an email can be sent from the form.

Oh well, more fun in coding.

Orlan
 

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